• Resolved mkhunt1

    (@mkhunt1)


    Hello, I’ve been trying to add a clicky (clicky.com) script into a pages header, but I’m getting 403 forbidden because wordfence is blocking it as an XSS attempt..(it’s javascript code).

    I’ve whitelisted it in the actual firewall alerts, but the problem with this is that the whitelist is too specific and even narrowed to the theme I’m using. Since I’m working with a lot of sites this solution is not effective because each whitelist is different.

    I’m looking for a way to whitelist this request so it works on any other website no matter what theme I’m using.. or if theres a way to whitelist the file wp-options.php completely or just something that can help me insert a javascript snippet on the header without wordfence flagging it as an XSS attempt. thank you!

    Clicky code snippet example:

    <script type=”text/javascript”>
    var clicky_site_ids = clicky_site_ids || [];
    clicky_site_ids.push(101030810);
    (function() {
    var s = document.createElement(‘script’);
    s.type = ‘text/javascript’;
    s.async = true;
    s.src = ‘//static.getclicky.com/js’;
    ( document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0] ).appendChild( s );
    })();
    </script>

    Whitelist I’ve tried:

    URL: /wp-admin/options.php
    Param: POST Body
    Param name: request.body[request.body[schema][mts_header_code]] (too specific schema is the theme I was using on that website)

    I’ve also tried obfuscating the JS code with no sucess. I’m very thankful for any insights and suggestions you guys do, thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfphil

    (@wfphil)

    Hello,

    Did you switch the Firewall to Learning Mode to see if Wordfence automatically white-lists the script for you?

    Thread Starter mkhunt1

    (@mkhunt1)

    Yes, I’ve already done that but I’m looking for a more “standard” solution, learning mode could be counter-productive since it could whitelist actual attacks going on..

    Plugin Support wfphil

    (@wfphil)

    Hello,

    Yes you should only have Learning Mode on temporarily and allow the script to load so that it can be white-listed and then set the Firewall to Enabled and protecting.

    What was the outcome of switching to Learning Mode and allowing the script to load please?

    Plugin Support wfphil

    (@wfphil)

    Hello,

    As you haven’t replied I will assume that the instructions did solve your issue and I will now mark this topic as resolved.

    If however, for whatever reason, you are still experiencing this issue and it is not resolved please respond to the post, which moves it back up the queue, and mark this topic as “not resolved”.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘False positive XSS clicky script’ is closed to new replies.