diff options
author | Marc Bowes <marcbowes@gmail.com> | 2011-10-20 10:00:42 +0300 |
---|---|---|
committer | Marc Bowes <marcbowes@gmail.com> | 2011-10-20 10:00:42 +0300 |
commit | 951a325c99ef2845f29ef95c85230ac2e835a31c (patch) | |
tree | 2417e8f5ccd86b0de2699a83a2da285ae5931b88 | |
parent | 4e9729df3f03ee16445082b7d386ee14b4370461 (diff) | |
download | rails-951a325c99ef2845f29ef95c85230ac2e835a31c.tar.gz rails-951a325c99ef2845f29ef95c85230ac2e835a31c.tar.bz2 rails-951a325c99ef2845f29ef95c85230ac2e835a31c.zip |
Remove the unneeded `\d` when sanitizing `X-Request-Id`.
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/request_id.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/request_id.rb b/actionpack/lib/action_dispatch/middleware/request_id.rb index d7bb9c58df..bee446c8a5 100644 --- a/actionpack/lib/action_dispatch/middleware/request_id.rb +++ b/actionpack/lib/action_dispatch/middleware/request_id.rb @@ -28,7 +28,7 @@ module ActionDispatch private def external_request_id(env) if request_id = env["HTTP_X_REQUEST_ID"].presence - request_id.gsub(/[^\w\d\-]/, "").first(255) + request_id.gsub(/[^\w\-]/, "").first(255) end end |