网站建设 百度贴吧,福建网站建设网,企业建设网站的步骤是什么,亅新厦建设集团网站基本上XSS是一个OUTPUT问题 – 但Codeigniter将其作为INPUT问题处理.Can someone elaborate how it’s bad…问题是xss_clean会改变你的INPUT – 这意味着在某些情况下(比如你所描述的密码问题)输入不是预期的.…or at least give 1 most probable scenario where it can be ex…基本上XSS是一个OUTPUT问题 – 但Codeigniter将其作为INPUT问题处理.Can someone elaborate how it’s bad…问题是xss_clean会改变你的INPUT – 这意味着在某些情况下(比如你所描述的密码问题)输入不是预期的.…or at least give 1 most probable scenario where it can be exploited?它只查找某些关键词,例如“javascript”. xss_clean没有检测到其他脚本操作,而且它不会保护您免受任何“新”攻击.The one thing I don’t like is javascript: and such will be converted to [removed]. Can I extend the CI’s security core $_never_allowed_str arrays so that the never allowed strings return empty rather than [removed]你可以做到这一点 – 但你只是把一个绑带放在一个糟糕的解决方案上.I’ve been reading about pros and cons about whether to escape on input/output with majority says that we should escape on output only.这是正确的答案 – 逃避所有输出,并且你有真正的XSS保护,而不改变输入.我个人在Codeigniter中对XSS保护的方法是我不对输入进行任何XSS清理.我在_output上运行一个钩子 – 它清除我的所有“view_data”(这是我用来向视图发送数据的变量).如果我不想通过在我的控制器中插入“$view_data [‘clean_output’] false”来运行XSS Clean,我可以切换钩子检查if (( ! isset($this-CI-view_data[clean_output])) || ($this-CI-view_data[clean_output])){// Apply to all in the list$this-CI-view_data array_map(htmlspecialchars, $this-CI-view_data);}这为我的整个网站提供了自动和完整的XSS保护 – 只需几行代码而且没有性能损失.