在Codeigniter中替换的百分比字符 [英] Percent character replaced in Codeigniter

查看:82
本文介绍了在Codeigniter中替换的百分比字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Codeigniter我使用POST方法发送一个字符串%100,它变成0。我相信这是因为他们被视为编码,但他们不是。



有没有反正,取消这一点,同时仍保持安全高,因为这似乎是由 Security-> xss_clean()共同remove_invisible_characters()

造成


In Codeigniter I'm sending a string using POST method as "%100" and it becomes "0". I believe this is because they're being treated as encoded, but they're not.

Is there anyway to cancel this while still keeping security high, as this seems be caused by Security->xss_clean() and Common remove_invisible_characters()

解决方案

Just look for the remove_invisible_characters() function defined in the CodeIgniter system/core/Common.php which is called by the function CI_Input::_sanitize_globals(). It is responsible for the cleanup of certain escape sequences starting with "%". I prefer to override the input class to disable the automatic sanitization of the globals.

这篇关于在Codeigniter中替换的百分比字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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