403 禁止在使用 $_GET 参数中编码的 url 调用的 PHP 页面上 [英] 403 Forbidden on PHP page called with url encoded in a $_GET parameter

查看:28
本文介绍了403 禁止在使用 $_GET 参数中编码的 url 调用的 PHP 页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定 hello.php:

Given hello.php:

<?php echo "Hello"; ?>

渲染页面工作正常并返回Hello,但是

rendering the page works fine and returns Hello, however

http://example.com/hello.php?test=http%3a//whatever.com

返回 403 Forbidden.但奇怪的是,使 http 的第一个字母大写工作正常:

returns a 403 Forbidden. But oddly enough, making the first letter of http uppercase works fine:

http://example.com/hello.php?test=Http%3a//whatever.com

仅供参考,斜线编码的百分比也是 403:

FYI, percent encoding the slashes also 403s:

http://example.com/hello.php?test=http%3a%2f%2fwhatever.com

我开始怀疑这可能是乘客(我用来提供 RoR)的问题

I'm beginning to suspect this may be an issue with Passenger (which I use to serve RoR)

推荐答案

是 mod_security 的 10_asl_rules.conf 导致了这个错误.

It is mod_security's 10_asl_rules.conf causing this error.

这篇关于403 禁止在使用 $_GET 参数中编码的 url 调用的 PHP 页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆