diff --git a/lib/webrick/httpauth/basicauth.rb b/lib/webrick/httpauth/basicauth.rb index e835361dc2..210fb00bbe 100644 --- a/lib/webrick/httpauth/basicauth.rb +++ b/lib/webrick/httpauth/basicauth.rb @@ -34,7 +34,7 @@ module WEBrick unless basic_credentials = check_scheme(req) challenge(req, res) end - userid, password = basic_credentials.unpack("m*")[0].split(":", 2) + userid, password = basic_credentials.unpack("m*")[0].split(":", 2) password ||= "" if userid.empty? error("user id was not given.")