SQL注入是指某人在您的某个SQL查询中插入恶意内容的地方.
我们假设你有一个这样的SQL查询:
select * from people where name = '<name>' and password = '<password>'
Run Code Online (Sandbox Code Playgroud)
现在让我们假设,<name>
并<password>
通过一些类型的人对你的网页被替换.如果有人输入这个作为他们的密码......
' or '' = '
Run Code Online (Sandbox Code Playgroud)
...然后生成的查询将是:
select * from people where name = 'someone' and password = '' or '' = ''
Run Code Online (Sandbox Code Playgroud)
......这显然不是你的意图.你可以在这里阅读更多相关信息.
归档时间: |
|
查看次数: |
1298 次 |
最近记录: |