Hacker News new | past | comments | ask | show | jobs | submit
There is no good reason for really any Rails app to accept Windows-1252! This is reminiscent of the YAML vulnerability, which surprised most Rails users with the fact that Rails endpoints all accepted YAML to begin with.
Agreed on YAML.

It must be noted though that Excel exports CSV as Windows-1252 by default in France (and other countries).Apps that ingest these files and run regexps over them are quite frequent.

What if I am reading old ID3 tags and posting them verbatim to my rails app? Should I be detecting encodings and converting to utf8 before rails?
Why not?
Because not accepting it would break backwards compatibility and the general expectation that in HTTP the sender can use any non-obscure encoding and the receive has to deal with it. Of course there is no need for the receiver to implement special uppercasing for each encoding - more sensible would be to convert it to UTF-8 at the earliest opportunity.
It's 2026, I think legacy Windows code pages are obscure at this point.
Not on the web they aren't.
This kind of reasoning is literally how Rails ended up with the YAML bug.