Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11754 closed Bug (fixed)

Infinite loop in google chrome when contents contains not closed attributes

Reported by: Josep Sanz Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.4.1
Component: General Version: 4.3.4
Keywords: Cc:

Description

When I edit some contents using Google Chrome, CKEditor enters into an infinite loop.

I have checked the problem with the latest release 4.3.4 and with the nighly's demo. I'm using Google Chrome in GNU/Linux, but some users report to me the same problem using Google Chrome in Microsoft Windows 7.

To reproduce the problem:

1) Go to http://ckeditor.com/demo

2) Click to the Source HTML button

3) Paste the follow html code:

<table border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse;></table>

4) Return to the default view mode (clicking to the Source HTML button)

And then, the browser is consuming all CPU into an infinite loop!!!

Change History (13)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Keywords: chrome infinite loop removed
Milestone: CKEditor 4.4.1
Status: newconfirmed
Version: 4.3.4

Confirmed. Thanks.

comment:2 Changed 11 years ago by Piotrek Koszuliński

May be related to #11846.

comment:3 Changed 11 years ago by Marek Lewandowski

Could not reproduce it in 4.3.3

Reproducable in 4.3.4

comment:4 Changed 11 years ago by Marek Lewandowski

I did bisect that, issue is present since git:6675efbb79a4afd02ee7b2d52fefb2c07facd331

comment:5 Changed 11 years ago by Wiktor Walc

Version: 4.3.4

comment:6 Changed 11 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedassigned

comment:7 Changed 11 years ago by Marek Lewandowski

Status: assignedreview

Pushed to t/11754 at dev and t/11754 at tests.

comment:8 Changed 11 years ago by Piotrek Koszuliński

OMG...

 - return data.replace( /<\w([^'">]+|'[^']*'|"[^"]*")+>/g, function( match ) {
 + return data.replace( /<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g, function( match ) {

:D

comment:9 Changed 11 years ago by Piotrek Koszuliński

Status: reviewreview_passed

Force pushed some small corrections. Remember about leaving useful docs in both - dev code and tests. And there's nothing more useful in cases like this than tickets numbers.

While testing I found that Chrome and Firefox are not even trying to fix this missing quote - entire following code is parsed as style's attribute content. It's a definitely positive thing that browsers stop trying to be too smart.

comment:10 Changed 11 years ago by Marek Lewandowski

Resolution: fixed
Status: review_passedclosed

Fixed with git:dc7bcdb232 (merged to master) at dev and 09d164903a (merged to master) at tests.

comment:11 Changed 11 years ago by equinox

Is this bug fixed in 4.4.0 version? On demo page http://ckeditor.com/demo it still hangs Chrome tab with code:

<table border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse;></table>

CK version 4.4.0

comment:12 Changed 11 years ago by Piotrek Koszuliński

This bug is already fixed on master and it will be fixed in 4.4.1 which will be released on 20th of May. 4.4.0 was released few weeks ago, so it cannot contain this patch.

comment:13 Changed 11 years ago by equinox

Got it. Thanks.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy