aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-12-15 10:59:54 -0700
committerSean Griffin <sean@seantheprogrammer.com>2015-12-15 10:59:54 -0700
commit1ad94e760d7a0f4288fb6d29114176b2e5dde250 (patch)
tree1bc9beb922b9c2165e618e44a3cfd57cd65b907f /actionpack/test
parentdc3d3fb0b97d3be0501d66ba71a71611cf942b2b (diff)
parentd5a0d71037921320210ab719921c9ba621b98ec2 (diff)
downloadrails-1ad94e760d7a0f4288fb6d29114176b2e5dde250.tar.gz
rails-1ad94e760d7a0f4288fb6d29114176b2e5dde250.tar.bz2
rails-1ad94e760d7a0f4288fb6d29114176b2e5dde250.zip
Merge pull request #14212 from tylerhunt/fix-token-regex
Handle tab in token authentication header.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/http_token_authentication_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/http_token_authentication_test.rb b/actionpack/test/controller/http_token_authentication_test.rb
index 9c5a01c318..98e3c891a7 100644
--- a/actionpack/test/controller/http_token_authentication_test.rb
+++ b/actionpack/test/controller/http_token_authentication_test.rb
@@ -94,6 +94,14 @@ class HttpTokenAuthenticationTest < ActionController::TestCase
assert_response :success
end
+ test "authentication request with tab in header" do
+ @request.env['HTTP_AUTHORIZATION'] = "Token\ttoken=\"lifo\""
+ get :index
+
+ assert_response :success
+ assert_equal 'Hello Secret', @response.body
+ end
+
test "authentication request without credential" do
get :display