Processing hang occurs when saving content contains certain HTML tags

Bug #1819508 reported by Sherman Lai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Invalid
Undecided
Unassigned

Bug Description

version = 2017092609;
series = '17.10';
release = '17.10.1';
minupgradefrom = 2015030409;
minupgraderelease = '15.04.0 (release tag 15.04.0_RELEASE)';

Processing hang occurs when saving content pasted from Google Docs or external source

Details:

Where does this happen?
When adding/editing content in a portfolio

What happens?
Clicking on "Save" button shows "Processing..." but hangs (403) when pre-formatted content pasted from an external source, i.e. Google Docs, Gmail, Microsoft Word (less often), etc.
In addition, if using Mahara's editor only, this will occur if you do things such as change the font size.

Observations:
- Noticed that this will happen when span tags and li (with style attributes) are involved.

Workarounds:
- Paste as unformatted text, and make formatting changes from within Mahara.
- Or avoid (strip out) span or li (with style attributes) tags.

Other comments:
Previously, users have been able to do this without issues. If they are to make simple edits to content that originated from an external source like Google, they risk not being able to save their changes. The quick workaround is to copy and paste into a new content area (like mentioned in the workaround). The existing content, while can be displayed, may not be edited successfully unless the offending tags are stripped.

Tags: googledocs
Revision history for this message
Sherman Lai (slai1) wrote :
Revision history for this message
Sherman Lai (slai1) wrote :

We have noticed something new this morning.

A user reported that if you use Mahara's editor to change the font size, the same issue occurs.

One of our analysts noticed that if there are span tags as well as li tags with style attributes, this will occur.

summary: - Processing hang occurs when saving content pasted from Google Docs or
- external source
+ Processing hang occurs when saving content contains certain HTML tags
Sherman Lai (slai1)
description: updated
Revision history for this message
Sherman Lai (slai1) wrote :

Update: We have adjusted some server rules and it may have resolved the issue.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Can you please provide the HTML code of the text that is causing problems? Please make sure that it doesn't contain any confidential information.

Changed in mahara:
status: New → Incomplete
Revision history for this message
Sherman Lai (slai1) wrote :

Hi Kristina,

In our last update, we noticed that it was caused by our own server security rules.
Our server was installed with ModSecurity which blocked style attributes in html tags. We created a server rule for it to unblock that exception which solved the issue.

For example, the HTML code that would be blocked could be:
<span style="font-weight:400" />

Changed in mahara:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.