[rubygems/rubygems] Use better status for authentication failures
https://github.com/rubygems/rubygems/commit/ffa395411f
This commit is contained in:
parent
2e04336b67
commit
c076ac8a5f
@ -10,7 +10,7 @@ class CompactIndexStrictBasicAuthentication < CompactIndexAPI
|
||||
|
||||
# Only accepts password == "password"
|
||||
unless env["HTTP_AUTHORIZATION"] == "Basic dXNlcjpwYXNz"
|
||||
halt 403, "Authentication failed"
|
||||
halt 401, "Authentication failed"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,7 +10,7 @@ class EndpointStrictBasicAuthentication < Endpoint
|
||||
|
||||
# Only accepts password == "password"
|
||||
unless env["HTTP_AUTHORIZATION"] == "Basic dXNlcjpwYXNz"
|
||||
halt 403, "Authentication failed"
|
||||
halt 401, "Authentication failed"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user