Heim  >  Artikel  >  Backend-Entwicklung  >  谁给我介绍一下 cgi.fix_pathinfo 这个所谓的漏洞 , 我怎么发现不存在这样的问题呢 ~~

谁给我介绍一下 cgi.fix_pathinfo 这个所谓的漏洞 , 我怎么发现不存在这样的问题呢 ~~

WBOY
WBOYOriginal
2016-06-06 20:32:201152Durchsuche

如题 , 求解 php.ini 中的 cgi.fix_pathinfo

为什么有的文章总是提示我们要设置成 0 ;

回复内容:

如题 , 求解 php.ini 中的 cgi.fix_pathinfo

为什么有的文章总是提示我们要设置成 0 ;

举例来说,开启的危害就是假设你的网站有http://xx.com/a.jpg这样的一张图片,我通过http://xx.com/a.jpg/foo.php就可以查看到这个文件的二进制内容,意思就是可以通过php来执行它.问题就来了,如果你的网站允许用户上传图片,那么用户就可以构造一些恶意的代码,并伪装成图片上传.然后通过上面说的那种方式就可以在你网站的服务器上面通过php跑恶意代码了.
具体可以看连接[1]http://www.laruence.com/2010/05/20/1495.html

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn