http://search.xxxxxxx.com/cgi-bin/search1?userid=12345 and passWord='1234'
~~~~~~~~~~~~~~~~~~~~~~~~~
请看cgi程序use_show_info返回什么
“错误: Fail To Execute SQL: Unknown column 'password' in 'where clause' ”
这种调试信息本该只用到测试的时候显示给程序员调试用的,但目前清清楚楚显示给我 们.
cgi程序把我们提交的内容12345 and password='1234'全部加到sql语句中送给了mysql 操作, 当然出错了,因为操作的表里没有password这个字段。我猜想这条sql语句可能是这样 的:
select xxx,xxx,xxx,xxx from usertable where userid= %s
等加入我们提交的内容后,真正送给mysql的sql语句就变成:
select xxx,xxx,xxx,xxx from usertable where userid= 12345 and password='1234'
^^^^^^^^^^^^^^^^^^^^^^^^^^