谁能依靠Apache清理URL?
我使用默认安装中的mod_wsgi设置了Apache,使用一个非常简单的testing应用程序test.wsgi : def application(environ, start_response): status = '200 OK' output = 'Path: %s' % environ['PATH_INFO'] response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] Apache本身基本上是这样configuration的: WSGIScriptAlias / /home/user/wsgi_test/test.wsgi 现在,如果我访问该服务器上的URL,我得到以下输出: GET /test/../test/./test => Path: /test/test GET /test/%2E%2E/abc => Path: /abc GET /test%2fabc => 404 Not found (由于AllowEncodedSlashes off ,我想) 因此,在我看来,Apache在将这些URL传递给应用程序之前parsing/预处理这些URL,这很好,因为它可以防止文件path不属于查询string的大量本地文件包含和目录遍历攻击。 一个人可以依靠这种行为,或者有一些/test/foo/../bar方法来欺骗Apache实际上传递像/test/foo/../bar的URL到应用程序? 如果可能的话,它会是一个Apache的bug吗?