Skip to content

Commit

Permalink
[rubygems/rubygems] Use better status for authentication failures
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Aug 16, 2023
1 parent 2e04336 commit c076ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit c076ac8

Please sign in to comment.