PHP 5.2.x: $_POST is empty when any field has value of “drop anywords from anywords”?

蓝咒 提交于 2019-12-24 01:53:14

问题


Very weird bug!

When at least 1 form field has value of "zeroOrMoreWords drop oneOrMoreWords from oneOrMoreWords", the $_POST comes empty! Just to confirm to myself I'm not crazy, I tried the same thing on another website that uses PHP 5.2.11 and happens the same thing!

I tried:

  • PHP 5.2.8 = $_POST comes empty.
  • PHP 5.2.11 = $_POST comes empty.
  • PHP 5.2.14 = Works fine.
  • PHP 5.3.5 = Works fine.

Any explanation to this weird thing?

Here's a live example on a famous website: https://www.deviantart.com/users/login try to insert "drop xxx from xxx" in username field, and type anything for password field, the form will come back without showing any errors!


回答1:


Sounds like apache *mod_security* or something similar is active. If it thinks something is SQL injection or something else that is bad, it will remove the POST data.



来源:https://stackoverflow.com/questions/8294203/php-5-2-x-post-is-empty-when-any-field-has-value-of-drop-anywords-from-anywo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!