【问题标题】:How does ng-bind and ng-bind-html prevent XSS?ng-bind 和 ng-bind-html 如何防止 XSS?
【发布时间】:2016-09-15 02:42:53
【问题描述】:

我一直在尝试研究 Angular JS 上的 XSS,发现 ng-bind 和 ng-bind-html 可以防止 XSS 防止服务器站点中已经由 html-encode 编码的任意用户输入。这究竟是如何工作的?有什么办法可以绕过这个以便执行 XSS 吗?

【问题讨论】:

    标签: angularjs xss ng-bind-html ng-bind


    【解决方案1】:

    ng-bind-html 使用 $sce.getTrustedHtml 清理传递的 html。

    【讨论】:

      猜你喜欢
      • 2015-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-09
      • 1970-01-01
      • 2016-05-29
      相关资源
      最近更新 更多