是消毒安全吗?
我正在使用富文本编辑器(CKEditor),并且我有机会让用户创建向其他用户显示的配置文件。
当我将 CKEditor 可以控制的许多属性显示为:
<%= sanitize(profile.body) %>
我的问题是:允许解析属性“style”是否安全?这将允许显示文本颜色、大小、背景颜色、居中、缩进等内容。我只是想确保它不会允许黑客访问我不知道的东西!
I am using a rich text editor (CKEditor) and I have the opportunity to let users create profiles that are displayed to other users.
Many of the attributes CKEditor can control are being lost when I display them as:
<%= sanitize(profile.body) %>
My question is: is it safe to allow the attribute 'style' to be parsed? This would allow things like text color, size, background color, centering, indenting, etc. to be displayed. I just want to be sure it won't allow a hacker access to something I don't know about!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不。
更不用说 UI 欺骗攻击了,比如将虚假的登录表单放置在真实的登录表单上。
No.
Not to mention UI-spoofing attacks like positioning a false login form over a real one or something.