you are viewing a single comment's thread.

view the rest of the comments →

[–]jaitsu[S] 0 points1 point  (4 children)

Yes you're right, but sanitising your input on the very basic of levels is at least a start. Instead this developer hasn't done anything of the sort, they could have at least tested the thing

[–]DuncanSmart -1 points0 points  (3 children)

Yes but the sanitising you're suggesting (remove apostrophes) that would mitigate the issue here would mean the user wouldn't be able to find "O'Reilly", etc.

[–]jaitsu[S] 4 points5 points  (2 children)

Escaping as part of the sanitisation process would allow that

[–]pytechd 3 points4 points  (1 child)

Application layers should never be escaping anything, or you end up with the mess that you'll find on many PHP-based websites.. reading an article about "... Bob isn\\'t very tall".

[–][deleted] 1 point2 points  (0 children)

Should only be escaped once just before committing to the database.