14
z3dy
8y

For the love of good, dear web devs. Please trim your user inputs before validating them. Thanks!

Comments
  • 1
  • 0
    @nblackburn trim means to cut the spaces before and after the users input
  • 1
    @z3dy depends if you are talking about the function or in general which wasn't clarified.
  • 0
    Just curious, why is that bothering you, or in what situation was that bothering ?
  • 0
    @thecritic I copied an URL into a text field. The validation failed, because I copied a space before the URL.
  • 1
    Dear backend devs, please clean up your input before you use it. I can fix it in the front end, but if something else somehow gets to your api, it will still flip the fuck out and risk sql injection to boot.
Add Comment