-
Bug
-
Resolution: Fixed
-
Highest
-
6.2.1, 6.4.1, 6.6.10, 6.8.0, 6.13.5, 7.3.1, 7.16.4, 7.19.1, 7.20.1, 8.1.0, 8.2.2, 8.7.2, 8.5.14, 8.5.15
-
71
-
Severity 2 - Major
-
755
-
The fix for this bug has been released to our Long Term Support release.
The fix for this bug is now available in the latest release of Confluence 7.19
Additional notes about this fix can be found here.
Summary
There are some conditions where Confluence does not flatten html (specifically <span></span>) tags allowing multiple nested tags to be created that results in a stack overflow in the collaborative editor when parsing the page.
This behaviour can also cause the browser to crash for the same reason if Synchrony manages to parse the tags and return the page to the browser. Editing can also be slow or unresponsive in different ways, such as when pasting additional content.
Expected Results
Confluence should not allow nested tags sufficient to cause a stack overflow when editing a page.
Actual Results
Confluence allows sufficient nested tags to caused Synchrony to stack overflow and the thread to crash, or the browser to crash.
This Synchrony crash presents with the following errors
The following errors thrown in the atlassian-synchrony.log file:
{"synchrony":{"client":{"xj":"LTGdPBRd8dBKsBjD26IxbH0","Tj":"Maximum call stack size exceeded\nRangeError: Maximum call stack size exceeded\n at xC (eval at <anonymous> (<ConfluenceBaseURL>/s/202a4eb254bd334279a734425f2367bc-CDN/en_GB/7111/583f3f4010922d699723a091097524472954c767/e860d0fc70e2f6d6e8992c9ce453f407/_/download/contextbatch/js/_super/batch.js?locale=en-GB:188:128), <anonymous>:875:12)\n at Function.DC.j (eval at <anonymous> (<ConfluenceBaseURL>/s/202a4eb254bd334279a734425f2367bc- ... CDN/en_GB/7111/583f3f4010922d699723a091097524472954c767/e860d0fc70e2f6d6e8992c9ce453f407/_/download/contextbatch/js/_super/batch.js?locale=en-GB:188:128), <anonymous>:980:296)"},"entity":"/Synchrony-b495020f-be6e-32c1-97aa-722a3a3b3328/confluence-220529801","message":"synchrony.http [error] Maximum call stack size exceeded","source":"client","throwable":null,"ns":"synchrony.http","level":"error"},"message":"synchrony.http [error] Maximum call stack size exceeded"}
Checking the page storage format, multiple nested tags exist with an excessive stack depth
<p><span style="color: rgb(0,0,0);"><strong><span><strong><span><strong><span><strong><span style="color: rgb(255,102,0);"><span style="color: rgb(0,51,102);" lang="ko"><span lang="ko"><strong><span style="color: rgb(255,102,0);"><span style="color: rgb(0,51,102);" lang="ko"><span style="color: rgb(255,102,0);"><span style="color: rgb(0,51,102);" lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span style="color: rgb(255,102,0);"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span style="color: rgb(0,51,102);" lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><strong><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko">ㅇ사전</span></span><span lang="ko"><span lang="ko"> 검토 : 미진행<span style="color: rgb(255,102,0);" lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><strong><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"><span lang="ko"> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></strong></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></strong></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></span></strong></span></span></strong></span></span></strong></span></span></strong></span></span></span></strong></span></span></strong></span></span></strong></span></span></span></strong></span></span></strong></span></span></strong></span></span></span></strong></span></span></strong></span></span></strong></span></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></strong></span></strong></span></p>
Workaround
- Install Confluence Source Code Editor
- Edit the page, then click the Source Editor icon to edit the page source
- Search for the stack of nested tags
- Once identified, remove all nested <span></span> tags between the <p> and </p> tags
- Save Page
Alternately, the remove formatting editor option can be used to strip out all the formatting including these span tags.
If the issue persists even after upgrading to the fixed version, please follow the above steps.
Notes
The excessive nested tags is caused by maintaining the formatting on a given page in a paragraph or table, and adding new content that also contains formatting data.
For instance
- Create a table with 2 rows
- Fill out content in both rows
- In the second row, add formatting like colours, new fonts, bolding etc
- Insert a new row below row 2
- Span tags from the source row will be continued into the new row
- Copy and paste the cells from the source row (2) into the destination row (3)
- Span tags are inserted from the clipboard inside the existing span tags
- Repeat steps 4 and 5 until Synchrony stops responding (6-7 times on average)
How to identify possibly affected pages
Run the following SQL query to identify possibly affected pages:
SELECT c.contentid, c.title, c.version, c.spaceid, s.spacekey FROM content c JOIN bodycontent bc ON c.contentid = bc.contentid JOIN spaces s ON s.spaceid = c.spaceid WHERE bc.body LIKE '%</span></span></span></span></span></span></span></span></span></span>%' AND c.prevver is null ;
- is related to
-
CONFSERVER-40969 Additional span section are added when copying entries in a list
- Closed
-
PSSRV-67184 Loading...
- relates to
-
CONFSERVER-93559 TinyMCE Code causing Nested Spans from Copy and Paste
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...