Support » Plugin: Wordfence Security - Firewall & Malware Scan » 403 error when posting new post with HTML embedded code

  • Resolved alainbn

    (@alainbn)


    Hi guys,

    I am having a little issue with Wordfence. One of the functions that I need to use on my site is to add some embedded HTML onto a page or post. When I currently do so the post returns a 403 error.
    I have already sorted the hosting server that also created a 403 error for the same type of post.
    When I disable wordfence then the error does not occur – and the post works.

    The embed code is from Amazon for a book product. example below.

    Q. what settings need to be implemented to allow the HTML embedded code to display without the 403 error?

    Cheers,

    Alain

    Code example

    <iframe type=”text/html” width=”336″ height=”550″ frameborder=”0″ allowfullscreen style=”max-width:100%” src=”https://read.amazon.com.au/kp/card?asin=B07P2M8V1R&preview=inline&linkCode=kpe&ref_=cm_sw_r_kb_dp_vmAFCbHSHDXSX&tag=brixbaxterc03-20&#8243; ></iframe>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @alainbn,

    Can you find out the textarea’s name? The textarea is the one where you placed <iframe ...> into it.

    1. Right-click the textarea -> Inspect Element
    2. Copy the name=****
    3. For example: https://i.imgur.com/NfT6ItA.png

    Then when you have the name, you can whitelist it:

    1. Go to Wordfence -> All Options
    2. Scroll down to Whitelisted URLs
    3. Add / for the URL (or whatever the URL is for that page)
    4. Select Param Type: POST Body
    5. Put the textarea’s name for the Param Name
    6. Add, and Save
    7. For example: https://i.imgur.com/WC8P1ZW.png

    Dave

    Thread Starter alainbn

    (@alainbn)

    Hi Dave,
    Firstly, I am not getting beyond the building phase – When I publish the error occurs – I do not see it on the frontend.
    I am making use of the Elementor HTML widget so it is not a ‘textarea’ as such – Just popping the HTML code in.

    When I do inspect I cannot find anything referencing ‘name=…’

    Thanks
    Alain

    Hi again,

    Here are the steps to whitelist it:

    1. Go to Wordfence -> All Options
    2. Scroll down to Whitelisted URLs
    3. Put /wp-admin/admin-ajax.php for the URL
    4. Select Param Type: POST Body for the dropdown
    5. Put actions for the param name
    6. Click Add
    7. Click Save Changes in the top-right corner

    For example: https://i.imgur.com/WQew5o5.png

    Dave

    Hi,

    I have a WPForo discussion forum setup on my site and I have been trying to post embedded google maps and I get the same error message.

    403 Forbidden
    A potentially unsafe operation has been detected in your request to this site.

    How do I allow embedding google maps in my posts?

    Thanks

    Thread Starter alainbn

    (@alainbn)

    Hi Dave,

    Thanks for that.
    That has fixed that issue.

    Much appreciated.

    Cheers,
    Alain

    Hi @hkindy,

    Can you open another thread? I’ll be happy to assist you there!

    Dave

    Thank you will do that. I added it to the same post as I thought it is the same issue 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘403 error when posting new post with HTML embedded code’ is closed to new replies.