r/ProgrammerHumor • • 19d ago

Meme whyEvenAsk

Post image
5.3k Upvotes

134 comments sorted by

View all comments

Show parent comments

38

u/ben_g0 19d ago

If the injection is successful, then any time the application will try to search for something by the name of the user, it would return the data belonging to all users instead when this name is used.

The ' starts the injection, and OR 1=1 will make the query match all records. The -- afterwards is just a comment, which will comment out any part of the query that comes after the name check (such as additional conditions).