Comment by sparrish
6 years ago
This is funny. I wonder what would happen if you could put a 'NOT ' in front of your plate number... would everyone but you get a ticket?
6 years ago
This is funny. I wonder what would happen if you could put a 'NOT ' in front of your plate number... would everyone but you get a ticket?
Nah, because it's not unsanitized SQL at fault, but people writing a literal NULL in the license plate field when there isn't one.
I doubt that. Normal people do not tend to use the word NULL at all.
What this usually is is the result of systems that talk to systems that talk to systems that talk to systems, all in different legacy formats never written to be interchange formats. One system has true SQL NULLs, the next system down the chain only accepts strings for that field, NULL gets written as the most sensible string, and then from that point on all downstream systems can't tell the difference between the original system having had an SQL NULL or having had the string NULL.
Maybe NULL is the default value if you don't enter anything
Did you read the article? It literally says people at a private citation outfit put NULL in the license plate field when there is no number available.
4 replies →
Actually, I think it's doubtful the folks at the private processing facility are actually writing 'NULL', but my guess is the DB field is just not set (i.e. left as NULL), and then when the info is read out somewhere it's just printed as the string literal value.
I'd guess that there is a CSV step involved.
Wouldn't their license plate be in quotes, though? 'NULL' != NULL
2 replies →
A colleague’s name is “True.” When we ran some reports to generate a check in list for an event - it was converted to either “TRUE” or “1” depending on the script.
I was amused.
Even without sql doing odd things certain strings will just cause problems.
I wonder, what will "DROP *;" license plate do?
Nah, because it's not unsanitized SQL at fault, but people writing a literal NULL in the license plate field when there isn't one.
Should be
Lic. plates are entered into thousands of systems, so yeah it can have an effect somewhere.
Nothing because it's not unsanitized SQL at fault.
Probably can’t do special characters, but maybe ASCII (0x23) will let you get around it.
1 reply →
Most states do not allow special characters in the plate text.
2 replies →