2012-03-08 121 views
0

使用POST HTTP方法,站点扫描器发现:XSS在忘记密码

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

就我看到的代码,Magento senitize _GET/_POST。我怎样才能解决这个问题?

回答

2

我想这将取决于你正在运行的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()) ?>" /> 

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