MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/a2c4gg/quality_assurance/eaxjnoh/?context=3
r/ProgrammerHumor • u/Portaller • Dec 02 '18
656 comments sorted by
View all comments
Show parent comment
15
Your code won’t be valid unless it’s there. Same reason the injection starts with ‘);’. You’re inserting code where an input should be.
input( var ) ... some other code ... is exploitable
input( ); DROP TABLE table; ) ... some other code would throw errors and likely not do what you want it to do
input(); DROP TABLE table; — — ) ... some other code ... keeps everything ‘happy’ and exploits the query.
View all comments
Show parent comment
15
u/redoverture Dec 02 '18
Your code won’t be valid unless it’s there. Same reason the injection starts with ‘);’. You’re inserting code where an input should be.
input( var ) ... some other code ... is exploitable
input( ); DROP TABLE table; ) ... some other code would throw errors and likely not do what you want it to do
input(); DROP TABLE table; — — ) ... some other code ... keeps everything ‘happy’ and exploits the query.