【问题标题】:XSS in forgot passwordXSS 忘记密码
【发布时间】:2012-03-08 10:42:50
【问题描述】:

使用 POST HTTP 方法,Site Scanner 发现:

  • 以下资源可能容易​​受到跨站点脚本(扩展模式)的攻击:
  • /customer/account/forgotpasswordpost/ CGI 的“电子邮件”参数: /customer/account/forgotpasswordpost/ [email=508 src=http://www.example. com/exploit508.js]

就我看到的代码而言,Magento 对 _GET/_POST 进行了敏感化。我该如何解决这个问题?

【问题讨论】:

    标签: security magento xss


    【解决方案1】:

    我想这取决于您运行的 Magento 版本。可以在app/design/frontend/base/default/template/customer/form/forgotpassword.phtml 找到相关模板的默认位置。用户可编辑且回显到屏幕的唯一值是电子邮件地址,当然在 Magento 1.6 中这是通过模板块 htmlEscape 方法传递的,但值得检查它是否在您的 Magento 版本中.

    <input type="text" name="email" alt="email" id="email_address" class="input-text required-entry validate-email" value="<?php echo $this->htmlEscape($this->getEmailValue()) ?>" />
    

    如果您发现它已经存在,那么值得检查该模板是否在您当前的主题中被重载。

    【讨论】:

      猜你喜欢
      • 2012-07-25
      • 2012-12-20
      • 2013-05-17
      • 2011-08-26
      • 2015-12-31
      • 2016-02-14
      • 2012-07-15
      • 2012-02-09
      • 2011-08-22
      相关资源
      最近更新 更多