Last modified: 2014-10-09 14:25:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62077, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60077 - CSSMin url() value remapping not working in certain obscure cases (braces in comments inside declarations: background: /*{test}*/ url(image.png) )
CSSMin url() value remapping not working in certain obscure cases (braces in ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.23.0
All All
: Normal minor (vote)
: 1.24.0 release
Assigned To: s7eph4n
: code-update-regression
: 63688 (view as bug list)
Depends on:
Blocks: 59845
  Show dependency treegraph
 
Reported: 2014-01-15 09:33 UTC by Fomafix
Modified: 2014-10-09 14:25 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
mah: Backport_to_Stable-


Attachments

Comment 2 Gerrit Notification Bot 2014-01-17 13:52:40 UTC
Change 108040 had a related patch set uploaded by Gerrit Patch Uploader:
Embed background images in jquery.ui.theme.css correctly

https://gerrit.wikimedia.org/r/108040
Comment 3 Fomafix 2014-01-17 13:53:54 UTC
The problem is in mediawiki/core in file
resources/jquery.ui/themes/default/jquery.ui.theme.css
Comment 4 Bartosz Dziewoński 2014-01-17 22:50:31 UTC
This actually looks like a core CSSMin bug to me: the url() value is not recognized and thus not processed as it should be (fixing the patch).


For the record, one of the problematic rules is below:

.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }


The braces in comments make this regex from CSSMin.php not match:

const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*?)(?P<query>\?[^\)\'"]*?|)[\'"]?\s*\)';
$pattern = '/(?:^|[;{])\K[^;{}]*' . CSSMin::URL_REGEX . '[^;}]*(?=[;}]|$)/';


Not sure if we want to contort this regex even further to support this…
comments, anyone?

Probably caused by https://gerrit.wikimedia.org/r/#/c/94511/ .
Comment 5 Bartosz Dziewoński 2014-04-08 17:39:45 UTC
*** Bug 63688 has been marked as a duplicate of this bug. ***
Comment 6 Gerrit Notification Bot 2014-06-08 22:49:20 UTC
Change 138286 had a related patch set uploaded by Foxtrott:
fix bug 60077 (CSSMin url() value remapping not working in certain obscure cases)

https://gerrit.wikimedia.org/r/138286
Comment 7 Gerrit Notification Bot 2014-06-09 11:46:19 UTC
Change 138286 had a related patch set uploaded by Foxtrott:
Fix "CSSMin url() value remapping not working in certain obscure cases"

https://gerrit.wikimedia.org/r/138286
Comment 8 Gerrit Notification Bot 2014-06-10 21:33:21 UTC
Change 108040 abandoned by Bartosz Dziewoński:
Embed background images in jquery.ui.theme.css correctly

https://gerrit.wikimedia.org/r/108040
Comment 9 Gerrit Notification Bot 2014-06-10 21:35:58 UTC
Change 138286 merged by jenkins-bot:
Fix "CSSMin url() value remapping not working in certain obscure cases"

https://gerrit.wikimedia.org/r/138286
Comment 10 Bartosz Dziewoński 2014-06-10 21:36:15 UTC
Thank you!
Comment 11 Bartosz Dziewoński 2014-06-10 22:51:36 UTC
Reverted in https://gerrit.wikimedia.org/r/#/c/138739/ :(
Comment 12 Niklas Laxström 2014-06-11 09:02:37 UTC
I can't find details of what actually broke anywhere.
Comment 13 s7eph4n 2014-06-11 21:18:45 UTC
My best guess right now is that it is a resource problem. Adding those new alterntives pushes preg_match over some limit for large files.
Comment 14 Bartosz Dziewoński 2014-06-11 21:44:38 UTC
Niklas, the symptom was that Vector's CSS disappeared from http://en.wikipedia.beta.wmflabs.org/.
Comment 15 Gerrit Notification Bot 2014-06-12 21:57:29 UTC
Change 139268 had a related patch set uploaded by Foxtrott:
Fix "CSSMin url() value remapping not working in certain obscure cases"

https://gerrit.wikimedia.org/r/139268
Comment 16 Gerrit Notification Bot 2014-06-30 18:50:18 UTC
Change 139268 merged by jenkins-bot:
Fix CSSMin url() remapping when comments in CSS contain curly braces

https://gerrit.wikimedia.org/r/139268
Comment 17 Bartosz Dziewoński 2014-06-30 19:33:24 UTC
I hope this works better now. Thanks again!
Comment 18 Bawolff (Brian Wolff) 2014-08-05 01:15:22 UTC
Quasar` on irc just now is experiancing this bug on 1.23.2, which suggests the fix should be backported.
Comment 19 Mark A. Hershberger 2014-10-09 14:25:52 UTC
If you want to backport this, that would be appreciated.  Cherry picking didn't work.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links