Support » Plugin: Post Snippets » [Plugin: Post Snippets] error with php code

  • Resolved rfmcomposer

    (@rfmcomposer)


    Hi,

    Thanks for this wonderful plugin!

    I have one problem though when I enter the following code:

    $email = addSlashes(str_replace(array('\r', '\n', '\\', '/', '..'), '', $_GET['email'])); // protects against System File & Source Code Disclosure, Null Byte Injection and HTTP Header Injection

    The backslashes and dots seem to be the problem.

    What can I do to get this working?

    http://wordpress.org/extend/plugins/post-snippets/

Viewing 1 replies (of 1 total)
  • I checked the plugin code and found the solution myself.

    The function function php_eval calls stripslashes().

    To get my code working I had to add a few extra backslashes:

    $email = addSlashes(str_replace(array('\\r', '\\n', '\\\\', '/', '..'), '', $_GET['email'])); // protects against System File & Source Code Disclosure, Null Byte Injection and HTTP Header Injection

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Post Snippets] error with php code’ is closed to new replies.