如何克服Codeigniter中的xss_clean错误? [英] how to overcome xss_clean error in codeigniter?

查看:81
本文介绍了如何克服Codeigniter中的xss_clean错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


无法访问与您的字段名称用户名相对应的错误消息。(xss_clean)

Unable to access an error message corresponding to your field name Username.(xss_clean)

无法访问与您的域名对应的错误消息字段名称电子邮件。(xss_clean)

Unable to access an error message corresponding to your field name Email.(xss_clean)

无法访问与您的字段名称密码对应的错误消息。(xss_clean)

Unable to access an error message corresponding to your field name Password.(xss_clean)

如何克服与字段相对应的错误? 无法访问与您的字段对应的错误消息 这到底是什么?

How to overcome errors corresponding to fields? "Unable to access an error message corresponding to your field" what is this exactly?

推荐答案


无法访问与您的字段名密码对应的错误消息。(xss_clean)

Unable to access an error message corresponding to your field name Password.(xss_clean)

无法访问对应于您的字段的错误消息 这到底是什么?

似乎很不言自明。您正在调用 xss_clean 作为验证规则,但是对此没有相应的验证消息。

Seems pretty self-explanatory. You're calling xss_clean as a validation rule, but there is no corresponding validation message for this.

让我猜...您将 xss_clean 保留在验证规则内,因为在以前的CodeIgniter版本和您尚未阅读官方的CodeIgniter版本3升级说明

Let me guess... you kept xss_clean within your validation rules because that's where it was used in your previous version of CodeIgniter, and you did not read the official CodeIgniter version 3 upgrade notes.


步骤13:检查 xss_clean表单验证规则的使用情况

关于XSS清理的一个鲜为人知的规则是,仅应将其应用于输出,而不是输入数据。

A largely unknown rule about XSS cleaning is that it should only be applied to output, as opposed to input data.

我们在自动和全局操作中犯了这个错误XSS清理功能(请参阅上面有关XSS的上一步),因此,为了阻止这种做法,我们还将正式支持中的 xss_clean删除

We’ve made that mistake ourselves with our automatic and global XSS cleaning feature (see previous step about XSS above), so now in an effort to discourage that practice, we’re also removing ‘xss_clean’ from the officially supported list of form validation rules.

因为表单验证库通常会验证输入数据,所以'xss_clean'规则根本不属于其中。

Because the Form Validation library generally validates input data, the ‘xss_clean’ rule simply doesn’t belong in it.

如果确实需要应用该规则,则现在还应该加载Security Helper,它包含xss_clean()作为常规函数,因此也可以用作验证规则。

If you really, really need to apply that rule, you should now also load the Security Helper, which contains xss_clean() as a regular function and therefore can be also used as a validation rule.

此处提供更多信息 forum.codeigniter.com/thread-1192.html

这篇关于如何克服Codeigniter中的xss_clean错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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