Home >Backend Development >PHP Tutorial >After adding mod_encoding module to apache2.2, php5.2.0 has a bug in url processing_PHP tutorial

After adding mod_encoding module to apache2.2, php5.2.0 has a bug in url processing_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:56:03869browse

The problem is that mod_encoding has already processed the url first, and PHP solved it again
For example
x.php?s=%252B%2F%2B%2F
Then $_GET['s'] gets is
+/ /
urlencode("+") = %2B
urlencode("%2B") = %252B
So, this url was decoded twice
First The second time is
urldecode( "%252B%2F%2B%2F") = %2B/+/
urldecode( "%2B/+/") = +/ /
Solution
Modification httpd.conf Move

EncodingEngine on
to the required visualHost. This cannot coexist with the php script.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318174.htmlTechArticleThis problem is that mod_encoding has already processed the url first, and PHP has solved it again. For example, x.php?s= %252B%2F%2B%2F Then $_GET['s'] gets +// urlencode("+")=%2B urlencode("%2B")=%25...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn