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
Release: 2016-07-21 15:56:03
Original
872 people have browsed it

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template