Jump to content

[SOLVED] 403 error if textarea has iframe tag


PWaddict
 Share

Recommended Posts

If I add html code (iframe) from Google Maps in a textarea field and try to save the page I will get a 403 error and the page will not get saved. Once I disabled Mod Security from cPanel and waited few minutes then I could save the iframe on pages without problems. Is there another way to solve this without disabling Mod Security?

Link to comment
Share on other sites

29 minutes ago, Zeka said:

I don't know cause I'm using the analytics.js. Btw I tested a youtube iframe embed code and still same problem. I've even tested adding just this: <iframe> and still same problem. ModSecurity doesn't like the iframe tag when you post a form.

Link to comment
Share on other sites

  • PWaddict changed the title to 403 error if textarea has iframe tag
7 minutes ago, PWaddict said:

I've tested this and It isn't accurate at all. For a proper map with 100% accurate results and without an API key the embed one is the ONLY option.

That module converts the url to an iframe link: https://github.com/teppokoivula/TextformatterGoogleMaps/blob/master/TextformatterGoogleMaps.module#L77

Do you think you could modify that line to change it to the parameters you need?

Link to comment
Share on other sites

15 minutes ago, adrian said:

That module converts the url to an iframe link: https://github.com/teppokoivula/TextformatterGoogleMaps/blob/master/TextformatterGoogleMaps.module#L77

Do you think you could modify that line to change it to the parameters you need?

It isn't possible cause the map url & iframe link has some encoded values such as the unique place id which isn't possible to get without an API key.

Link to comment
Share on other sites

28 minutes ago, adrian said:

Does modsec baulk at [iframe] ? 

If it works you could write a simple textformatter that translates that to <iframe>

Yes it works. Btw I've just entered the <iframe> tag on another textarea and it gets saved! I will check tomorrow why is this happening.

Link to comment
Share on other sites

  • PWaddict changed the title to [SOLVED] 403 error if textarea has iframe tag

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...