首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检查javascript、用户code=server代码的完整性

检查javascript、用户code=server代码的完整性
EN

Stack Overflow用户
提问于 2012-09-19 18:06:26
回答 3查看 131关注 0票数 3

有没有一种方法可以验证用户在使用客户端页面时使用Firebug更改了jQuery/JavaScript?

EN

回答 3

Stack Overflow用户

发布于 2012-09-19 18:07:44

不,没有办法证实这一点。

当涉及到来自浏览器的输入时,您应该始终进行验证和验证。Never trust the client

票数 4
EN

Stack Overflow用户

发布于 2012-09-19 18:07:47

不是的。客户端本质上是不安全的,它属于用户,而不是您。

票数 1
EN

Stack Overflow用户

发布于 2012-09-20 00:21:41

简而言之,这并不重要。

长长的答案:

代码语言:javascript
复制
  It matters if you are treating the JavaScript as part of your application structure, similar to how a SQL injection attack does bad things to your system.  You should validate that anything that gets passed from the client is sanitized before being stored.  The interesting attack vector here is if you allow me to persist elements into the structure of the web page and retrieve them at a later time.  You have opened the doors to a reflected XSS attack (one of my favorites).  This is indicative of a failure to sanitize user input and/or a failure to separate concerns UI from the system level code.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12492554

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档