Is SQL injection a risk today?

前端 未结 20 2175
暗喜
暗喜 2020-12-05 13:25

I\'ve been reading about SQL injection attacks and how to avoid them, although I can never seem to make the \"awful\" examples given work, e.g. see this post

20条回答
  •  孤城傲影
    2020-12-05 13:49

    That particular attack doesn't work, as mysql_query will only execute a single statement.

    I can still abuse your code though, e.g. if I arranged for id to be SELECT password FROM Users WHERE Username='admin' I might have a fighting chance of being able to get your system to expose some internal information.

    Basically, if you allow unfiltered input into your SQL, there will be some very creative ways of both creating data you didn't expect, and exposing data you didn't intend!

提交回复
热议问题