Jump to content

Malware Detected in classes/Tools.php


nbarnum

Recommended Posts

On line 2751 my malware software flagged this as a security risk:

    public static function str_replace_once($needle, $replace, $haystack)
    {
        $pos = false;
        if ($needle) {
            $pos = strpos($haystack, $needle);
        }
        if ($pos === false) {
            return $haystack;
        }
        return substr_replace($haystack, $replace, $pos, strlen($needle));
    }

We suspected a module or something was corrupted and someone was able to add that to our site.  I downloaded 1.6.1.4 from Prestashop and I see that exact same code is there as well.  What is this code and is it a security risk?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...