General help

Can't post iframe content

 
Picture of Max Skupin
Can't post iframe content
 

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: -
Picture of Simon Rediss-Whitfield
Re: Can't post iframe content
 

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?

 
Average of ratings: -
Picture of Max Skupin
Re: Can't post iframe content
 

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?


 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Can't post iframe content
Particularly helpful MoodlersTesters

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.

 
Average of ratings: -
Picture of Max Skupin
Re: Can't post iframe content
 

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

 
Average of ratings: -
Ben talking on the phone beside a monitor
Re: Can't post iframe content
 
Average of ratings: -
Picture of Max Skupin
Re: Can't post iframe content
 

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

 
Average of ratings: -
Picture of Max Skupin
Re: Can't post iframe content
 

Just to note, I don't know if it helps at all or not, but when i get the error i end up with the address:

http://mymoodleinstall.com/course/editsection.php

Maybe there is a problem with that file?

 
Average of ratings: -
Picture of Max Skupin
Re: Can't post iframe content
 

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)
Ben talking on the phone beside a monitor
Re: Can't post iframe content
Particularly helpful MoodlersTesters

Well done!

 
Average of ratings: -
Picture of Jeff Shrek
Re: Can't post iframe content
 

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.

 
Average of ratings: -