Site logo

[Support request] suspicious code according to anti-malware scan

Home Forums Support [Support request] suspicious code according to anti-malware scan

Home Forums Support suspicious code according to anti-malware scan

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2561562
    Patricia

    Hi guys, I run an anti-malware scan on my site and the program told that some files of generatepress could be infected. I would like to share with you the suspicious lines/codes to ask you if you recognize them or if you think they are actually malicious code the were injected please!

    Here we have the codeas:

    1. …/public_html/wp-content/plugins/gp-premium/elements/class-hooks.php

    Potential malicious code:

    `if ( $this->php && GeneratePress_Elements_Helper::should_execute_php() ) {
    ob_start();
    eval( ‘?>’ . $content . ‘<?php ‘ ); // phpcs:ignore — Using eval() to execute PHP.
    echo ob_get_clean(); // phpcs:ignore — Escaping not necessary.
    } else {
    echo $content; // phpcs:ignore — Escaping not necessary.
    }

    #2561566
    Patricia

    2. ?…/public_html/wp-content/plugins/gp-premium/hooks/functions/hooks.php

    Potential malicious code:

    `
    if ( ‘true’ == $php && ! defined( ‘GENERATE_HOOKS_DISALLOW_PHP’ ) ) {
    eval( “?>$value<?php ” );
    } else {
    echo $value;
    }
    }
    }

    Thanks for the help!

    #2561741
    David
    Staff
    Customer Support

    Hi there,

    that code is fine.
    its what GP uses to allow you to add PHP to a GP Hook Element.
    You can safely ignore those warnings.

    #2561756
    Patricia

    super! thank you for your quick support! have a nice day!!

    #2561803
    David
    Staff
    Customer Support

    You’re welcome – and you too!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.