我很难找到这个叫'$ this-> getAbsoluteFooter()'或者它的内容在哪里.它是模板文件吗?
我问的原因是因为我的网站被页脚中的js注入攻击.禁用$ this-> getAbsoluteFooter()删除了注入,所以我急于找到源.
我用Google搜索过,我唯一能找到的就是有人问同样的问题.
谢谢.
你被黑了,这意味着它可以在任何地方,所以当这对你不起作用时请记住这一点.
该getAbsoluteFooter
方法通常在以下文件中定义.
#File: app/code/core/Mage/Page/Block/Html.php
public function getAbsoluteFooter()
{
return Mage::getStoreConfig('design/footer/absolute_footer');
}
Run Code Online (Sandbox Code Playgroud)
在普通系统中,该getStoreConfig
方法将返回core_config_data
为传入路径(design/footer/absolute_footer
)存储的值.
当然,既然你被黑了,$this
你的模板中引用的实际类文件可能是服务器上的任何位置(取决于你的黑客的严重程度).尝试在特定系统上查找真实文件
//$this->getAbsoluteFooter();
$r = new ReflectionClass($this);
var_dump($r->getFilename());
Run Code Online (Sandbox Code Playgroud)
这应该揭示实际的文件名,可能是app/code/core/Mage/Page/Block/Html.php
,或者可能是其他的.
祝好运!