我的虚拟数据库中有一个表名称queries
,其中包含name
, email
, phone
, message
, 和region
。用户界面中有一个联系表单,可以直接将数据插入查询表中,而无需验证或清理任何内容。a','b','c','d','e'); DELETE FROM users; --
因此,我通过添加到其中一个字段来在表单上执行一些 SQL 注入,但它没有成功并收到以下错误:-
错误:-
Error: INSERT INTO queries (name,email,phone,message,region) VALUES('a','b','c','d','e'); DELETE FROM users; --','sdas','1234567890','fsfdsf','home')
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELETE FROM users; --','sdas','1234567890','fsfdsf','home')' at line 1
错误消息中的 SQL 查询对我来说似乎没问题,但我无法理解为什么它会给出语法错误。也许是因为查询后面有评论?
如果我遗漏了什么,有人可以看一下并帮助我吗?
谢谢。