aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-10-31 14:11:30 +0000
committerLouise Crow <louise.crow@gmail.com>2014-10-31 14:11:30 +0000
commitcf282aa30dc2077518140f303023f09f40112223 (patch)
treeb7ae3a47bfa03c8b7d3ab2039fad5af3d501fdaa /spec/controllers/general_controller_spec.rb
parent164879761a8d13dd1d62b80d5347e4f4832b9958 (diff)
Comment out spec which sends an invalid utf-8 param.0.18.0.15hotfix/0.18.0.15
The original error `ActionView::Template::Error` that this spec was written to represent (#1406) occurred under ruby 1.8 when the decoded non-utf-8 string was used in the locale switcher on the 'not found' error page to generate a url for the alternative locales. Under Ruby >= 1.9, the error thrown in that situation is an `invalid byte sequence in UTF-8` error, thrown in the same place - the locale switcher. However, no error seems to be thrown when the same param is used in a request in production. The upgrade to Rails 3.2.20 causes `String.split` to be called on the request path in `actionpack/lib/action_dispatch/middleware/static.rb` in order to check for attempts to access files outside the `public` directory. This means that under Ruby >= 1.9, an `invalid byte sequence in UTF-8` error will be thrown there in running this spec. I think a possible solution is to use the `rack-utf8_sanitizer` gem to provide middleware to strip invalid utf-8 from request URIs and headers before they're processed by Rails, but it's currently unclear whether that would have any undesirable side-effects.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions