4 ms·
Gotcha. Un-validated unicode text boxes for names in forms from now on. After all, someone could be named like the contents of a 64MB binary blob. Compromises
by notum 5y ago
Gotcha. Un-validated unicode text boxes for names in forms from now on. After all, someone could be named like the contents of a 64MB binary blob.
Compromises are unavoidable in web development.
- mike_hock 5y agoUnicode text boxes with no validation other than a (generous) length limit and unicode validation is exactly the right approach. Arbitrary assumptions and limitations littered throughout the code is not.
- klabb3 5y agoYes, and to be perfectly clear don't have a minimum length (either empty or nullable) and make it mutable, in any case where you're doing some form of soft identification (e.g. "Hi, $NAME, here is your reservation" or "I am calling from $COMPANY, may I speak with $NAME?") Also, tell me what the purpose you're using my name for, e.g. "Name as it appears on your payment card/passport/ID/SSN" helps tremendously in resolving ambiguity. Also, consider not asking for a name at all unless there's actually a good reason.
- notum 5y agoExcellent, that covers emojis as well.
- number6 5y agoOj yes litten QmFieSBUYWJsZXM=, we call him.
- david422 5y agoNullable, of course.
- goto11 5y agoFortunately this is also the simplest to implement, since this is the default. So just don't go out of your way to write code to restrict these to some arbitrary subset of characters and tell me I have an "illegal name". You probably need a length limit to prevent against attacks though. Just don't set it at 31 character.