Page 1 of 1

Can't save with iframe?

Posted: Sat Oct 10, 2020 1:29 am
by scottyboyyy
What would be stopping me from saving information or product with an iframe in description? It is taking me to a 404 if I try to save.

I've tried removing the javascript files from the information_form.twig, doesn't affect it. Also looked at information.php in the controller, validate form function doesn't seem to affect it. Tried removing if user permission allowed parameters incase it was this. Not sure what is stopping it.

It can be added directly to the description field database without an issue.

Not looking for a plugin editor, would like to know what blocks it. Any ideas? :-)

Re: Can't save with iframe?

Posted: Sun Oct 11, 2020 4:10 am
by rjcalifornia
scottyboyyy wrote:
Sat Oct 10, 2020 1:29 am
What would be stopping me from saving information or product with an iframe in description? It is taking me to a 404 if I try to save.
Can you explain this further? What are you trying to save and where?

Re: Can't save with iframe?

Posted: Mon Oct 12, 2020 6:26 pm
by ADD Creative
Could be a web application firewall. Although they usually give a 403. It the URL that gives a 404 a valid one?

Re: Can't save with iframe?

Posted: Mon Oct 12, 2020 6:33 pm
by letxobnav
What would be stopping me from saving information or product with an iframe in description?
Common sense but other than that, nothing.

Re: Can't save with iframe?

Posted: Mon Oct 12, 2020 6:36 pm
by paulfeakins
ModSecurity - ask your web host.

Re: Can't save with iframe?

Posted: Mon Oct 12, 2020 9:48 pm
by EvolveWebHosting

Re: Can't save with iframe?

Posted: Thu Oct 15, 2020 2:41 pm
by scottyboyyy
I know the classic editor has video and you can paste in a youtube link and it will display the video and if you view code view it shows the iframe.

I have removed summernote so that it is just a textarea field. This allows me to just work in code view and has been better for me so far - I have more control, can add anything (until this) and don't have the bug issue when saving in codeview.

If I simply put <iframe> without the video link, etc it takes me to a 404 page when saving.

Re: Can't save with iframe?

Posted: Thu Oct 15, 2020 2:45 pm
by letxobnav
If I simply put <iframe> without the video link, etc it takes me to a 404 page when saving.
if your html is solid then your host does not allow iframes in the html body, ask them.

Re: Can't save with iframe?

Posted: Thu Oct 15, 2020 3:03 pm
by scottyboyyy
letxobnav wrote:
Thu Oct 15, 2020 2:45 pm
If I simply put <iframe> without the video link, etc it takes me to a 404 page when saving.
if your html is solid then your host does not allow iframes in the html body, ask them.
Would my host not block me completely then?

I can add the iframe to the description within the database and it works fine. Also I can add iframes directly into the .twig files.

It is only via the admin textarea that I can't. The save button takes me to a 404. I've tested with a clean opencart install.

Below is what I am changing the description field to be:

Code: Select all

<div class="form-group required">
                    <label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}<br>                    </label>
                    <div class="col-sm-10">
                      <textarea name="information_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" style="height:450px; width:100%;" class="form-control">{{ information_description[language.language_id] ? information_description[language.language_id].description }}</textarea>
                      {% if error_description[language.language_id] %}
                      <div class="text-danger">{{ error_description[language.language_id] }}</div>
                      {% endif %} </div>
</div>
I will ask my host anyway!

Thanks for your help and time :-)

Re: Can't save with iframe?

Posted: Fri Oct 16, 2020 4:16 pm
by letxobnav
Would my host not block me completely then?
no, if they run a security module it would just block the individual request and either give a 404 or just drop the connection.
I can add the iframe to the description within the database and it works fine.
If that is the case, your host is not blocking.

not a twig expert but is this solid?

Code: Select all

{{ information_description[language.language_id] ? information_description[language.language_id].description }}