用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2132|回复: 2
收起左侧

[HELP] 用CodeIgnitr在Ubuntu nginx上开发,迁移到windowsIIS上后报URI非法

[复制链接]
发表于 2013-10-17 11:32:27 | 显示全部楼层 |阅读模式
用CI做一个系统,SSO部分部署成一个独立站点,也是用CI做的,在Ubuntu Nginx上测试好了,拿到windows 2008 R2上测试,直接用IIS FastCGI的模式跑PHP。测试过程中在一个跳转时报 “The URI you submitted has disallowed characters.”错误,有没有人能指点个思路,帮忙找找问题原因?多谢

涉案URI:
http://sso.mydomain.com/portal/auth/q.mydomain.com/9cf425ff2ca6837cc73ccf2730fdbc7a/http%3A%2F%2Fq.mydomain.com%2Flogin%2Ftoken_recieve%2F%7Ctoken%7C%2F%7Cticket%7C%2F%7Csign%7C/4f3e4300e22be981439b0403a52c024e


URI许可规则用的是默认配置:
PHP复制代码
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
复制代码


发表于 2013-10-17 11:47:42 | 显示全部楼层
试试看。

PHP复制代码
 
class MY_Input extends CI_Input
{
    function _clean_input_keys($str)
    {
        $config = &get_config('config');
        if ( ! preg_match("/^[".$config['permitted_uri_chars']."]+$/i", rawurlencode($str))) {
            exit('Disallowed Key Characters.');
        }
        if (UTF8_ENABLED === TRUE) {
            $str = $this->uni->clean_string($str);
        }
        return $str;
    }
}
 
复制代码
 楼主| 发表于 2013-10-17 14:17:28 | 显示全部楼层
Bobby 发表于 2013-10-17 11:47
试试看。

多谢,在其他地方看到过这个说法,试了下,貌似没有作用,可能我遇到的问题另有原因。
我继续尝试,有结果后会分享到这里。

本版积分规则