3 ms·
If someone wants to register with the username O'Malley and password O`Malley, would you let them?
by 1970-01-01 5y ago
If someone wants to register with the username O'Malley and password O`Malley, would you let them?
- simonw 5y agoThat's not sanitization, that's validation. You implement a validation rule that says that the password and the username can't be the same thing, then use that to redisplay the registration form with an error message.
- 1970-01-01 5y agoSometimes, you just sanitize input for user reasons. The username and password above are different ASCII strings. The non-tech savvy (very elder) user does not know the difference between "`" and "'" which means they are locked-out. This results in phone calls to support, which in volume result in "fix the password field" See https://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html https://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html
- simonw 5y agoI'd call that normalization rather than sanitization, but that's my own personal terminology, not necessarily terminology that's widely used.