Can't post iframe content

Can't post iframe content

by Max Skupin -
Number of replies: 10

Hello, I'm using moodle. 2.9.

Before i was able to embed videos using iframes without any problem, now whenever i try to do that i get this error:


403 Forbidden

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

I tried posting other stuff like files, and text, all good.

We have all our videos hosted in vimeo, untill very recently I was able to embed videos just fine, i dont know what changed, looked everywhere, please help me.


What im ptrying to post is something like this code:

<iframe src="https://player.vimeo.com/video/999919012" width="500" height="281" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>


Also, there are a lot of this iframes already posted and working in a lot of courses, its just now that i cant do it.

Average of ratings: -
In reply to Max Skupin

Re: Can't post iframe content

by Simon Rediss-Whitfield -

I am not sure if this is actually a moodle error, was there any more details on this error screen? such as what blocked the access?

In reply to Simon Rediss-Whitfield

Re: Can't post iframe content

by Max Skupin -

no, it just says


403 Forbidden

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


after i try to save something with an iframe in it,


Anywhere i can check for errors?


In reply to Max Skupin

Re: Can't post iframe content

by ben reynolds -

I tried pasting your iframe into a label and got "Sorry This video does not exist." No problem with a 403, though. That's in 2.9.

In reply to ben reynolds

Re: Can't post iframe content

by Max Skupin -

i changed it, but in any case, the iframe i use can only be seen in that site, the video permissions are restricted in vimeo, also, there are lots of iframes already used in courses featuring videos, they all work, the problem is when i try to post new videos using iframes

In reply to ben reynolds

Re: Can't post iframe content

by ben reynolds -
In reply to ben reynolds

Re: Can't post iframe content

by Max Skupin -

Well, I don't have mod_security installed, I'm going to read the documentation and try to figure it out, if i cant i will have to reinstall moodle from scratch

In reply to Max Skupin

Re: Can't post iframe content

by Max Skupin -

I FOUND THE PROBLEM!

I need to explain a few things for context,

I have a vps with centos 7, so, I installed LAMP, did some virtual domains and i have wordpress and moodle working side by side.

In wordpress i have installed wordfence security, in the latest patche they installed a new firewall, at the begining was in learning mode.

Now is in full mode, and apparently is even protecting the moodle install, even when they are in sepparate servers, i need to check how to have wordfence isolated, as soon as i changed the firewall to learning again, the error is gone.

I noticed this because looking for the error text without mentioning moodle, i get a lot of results with this same error in wordpress + wordfence.

I'm spechless, didn't knew something like this could happen, I'll will notify more about this when i find a way to make it work.

Average of ratings: Useful (1)
In reply to Max Skupin

Re: Can't post iframe content

by Jeff Shrek -

Just an FYI that I was having the same 403 FORBIDDEN error issue and I contacted web host and it did turn out to be a mod_security rule and my host turned off that rule for me.