Where can I find the contents of $ this-> getAbsoluteFooter () Magento

I'm struggling to find what it calls '$ this-> getAbsoluteFooter ()' or where this content is. Is this a template file?

I ask because my site was hacked using js injection in the footer. Disabling $ this-> getAbsoluteFooter () removed the injection, so I want to find the source.

I was looking for him, and the only thing I can find is the one who asks the same question.

Thanks.

+5
source share
2 answers

You have been hacked, which means it can be anywhere, so keep that in mind if this does not work for you.

The getAbsoluteFooter method getAbsoluteFooter usually defined in the following file.

 #File: app/code/core/Mage/Page/Block/Html.php public function getAbsoluteFooter() { return Mage::getStoreConfig('design/footer/absolute_footer'); } 

On a regular system, the getStoreConfig method will return the value stored in core_config_data for the path traveled ( design/footer/absolute_footer ).

Of course, since you are hacked, the actual file of the $this class that your template refers to can be located anywhere on the server (depending on the severity of your hack). Try to find the real file in your specific system.

 //$this->getAbsoluteFooter(); $r = new ReflectionClass($this); var_dump($r->getFilename()); 

This should show the actual file name, which could be app/code/core/Mage/Page/Block/Html.php , or maybe something else.

Good luck

+6
source

I found out that the code was entered into the database in the table core_config_data using path 'design / footer / absolute_footer'; Read more about https://magento.stackexchange.com/a/42529/57576 Ty

0
source

Source: https://habr.com/ru/post/1233898/


All Articles