Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP digest authentication fails when request URI ends with '?' #3228

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions actionpack/test/controller/http_digest_authentication_test.rb
Expand Up @@ -208,6 +208,16 @@ def authenticate_with_request
assert !ActionController::HttpAuthentication::Digest.validate_digest_response(@request, "SuperSecret"){nil} assert !ActionController::HttpAuthentication::Digest.validate_digest_response(@request, "SuperSecret"){nil}
end end


test "authentication request with request-uri ending in '?'" do
@request.env['HTTP_AUTHORIZATION'] = encode_credentials(:username => 'pretty', :password => 'please',
:uri => '/http_digest_authentication_test/dummy_digest?')
@request.env['PATH_INFO'] = "/http_digest_authentication_test/dummy_digest?"
get :display

assert_response :success
assert_equal 'Definitely Maybe', @response.body
end

private private


def encode_credentials(options) def encode_credentials(options)
Expand Down