3 ms·
> accepting a small set of known-safe characters is much safer than accepting any character and hoping it will be properly escaped at every level It's also how
by int_19h 3y ago
> accepting a small set of known-safe characters is much safer than accepting any character and hoping it will be properly escaped at every level
It's also how you end up with apps that people can't use because they reject their perfectly valid legal name, address etc.
- tsimionescu 3y agoAbsolutely, that's why I said "if you can get away with it". There are situations where this is ok - for example, a company user ID. Even for names, it is often perfectly fine to require someone to spell their name with Latin characters. For example, even if your name is officially 鳥山 in Japan, you will have to spell it out as Toriyama when you leave Japan, both in formal and informal settings, on paper just as much as in electronic forms, since no one would be able to understand it otherwise. And similarly, if your name is Smith, in Japan you will often have to spell it (and sometimes even pronounce it) スミス.