You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Started GET "/attachments/5450/%d0%a2%d0%97.pdf" for 10.0.0.1 at 2017-07-04 08:12:53 +0300
Processing by AttachmentsController#show as HTML
Parameters: {"id"=>"5450", "filename"=>"\xD0\xA2\xD0\x97.pdf"}
Current user: VVD (id=3)
Rendered common/error.html.erb within layouts/base (0.2ms)
Filter chain halted as :find_attachment rendered or redirected
Completed 404 Not Found in 76ms (Views: 28.6ms | ActiveRecord: 42.5ms)
With Rails 4.2.8 production.log:
Started GET "/attachments/5450/%d0%a2%d0%97.pdf" for 10.0.0.1 at 2017-07-04 11:06:56 +0300
Processing by AttachmentsController#show as HTML
Parameters: {"id"=>"5450", "filename"=>"ТЗ.pdf"}
Current user: VVD (id=3)
Rendered common/_other.html.erb (0.8ms)
Rendered layouts/_file.html.erb (17.1ms)
Rendered attachments/other.html.erb within layouts/base (26.4ms)
Completed 200 OK in 123ms (Views: 76.3ms | ActiveRecord: 21.1ms)
This commit changes the behavior such the path_params now default to
UTF8 just like regular parameters. This also changes the behavior such
that if a path parameter contains invalid UTF8 it returns a 400 bad
request. Previously the behavior was to encode the path params as binary
but that's not the same as query params.
So this commit makes path params behave the same as query params.
It's important to test with a path that's encoded as binary because
that's how paths are encoded from the socket. The test that was altered
was changed to make the behavior for bad encoding the same as query
params. We want to treat path params the same as query params. The params
in the test are invalid UTF8 so they should return a bad request.
Fixes#29669
*Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
Steps to reproduce
Expected behavior
Browser start downloading file.
Actual behavior
Error 404.
System configuration
Rails version: 4.2.9
Ruby version: 2.4.1
But it work fine with Rails 4.2.8 in same environment.
More information is here: https://www.redmine.org/issues/26337#note-9
With Rails 4.2.9 production.log:
With Rails 4.2.8 production.log:
Look at difference:
The text was updated successfully, but these errors were encountered: