Home Forums Newsletter Plugin Support Fatal BUG: eval() with unescaped code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6571
    Anonymous
    Inactive

    Dear Stefano Lissa,

    After installing Newsletter 3.0.2 on WP 3.4.2 I encountered fatal bug.

    /plugin.php line 843

    eval('function ' . $name . '(){global $newsletter;require "' . $file . '";}');

    Here You have a string variable wrapped by doublequotes inside Your evaluating code. This means, a path like

    D:\n_as_first_letter/newsletter

    Is parsed as

    D:
    _as_first_letter/newsletter

    And raises a Fatal error on a later request command. Note that mixing up backslashes and forward slashes is not pretty, but unavoidable on a Windows server.

    A quick Fix would be, to replace the doublequotes by escaped single quotes:

    eval('function ' . $name . '(){global $newsletter;require \'' . $file . '\';}');

    #6575
    Stefano
    Keymaster

    You’re right, thank you!

    Stefano.

     

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