Page MenuHomePhabricator

mw.loader.inspect throws exceptions for CSS queries with pseudo elements
Closed, ResolvedPublic

Description

While debugging T112552, we discovered that mw.loader.inspect() on Safari and Firefox might throw exceptions for several types of CSS selectors.

The exception is a DOM Exception 12 SyntaxError.

The first cause of this was document.querySelector() being fed with actual invalid CSS queries on Commons.

The second cause is a bug/undefined behavior for vendor prefixed pseudo elements.

  1. Webkit fails on all of these
  2. Firefox throws an exception on vendor prefixes other than their own
  3. Chrome throws an exception on vendor prefix other than their own.

Details

Related Gerrit Patches:

Event Timeline

TheDJ created this task.Sep 15 2015, 1:27 PM
TheDJ raised the priority of this task from to Needs Triage.
TheDJ updated the task description. (Show Details)
TheDJ added a subscriber: TheDJ.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 15 2015, 1:27 PM

Change 238439 had a related patch set uploaded (by Catrope):
Ignore exceptions from document.querySelector()

https://gerrit.wikimedia.org/r/238439

TheDJ updated the task description. (Show Details)Sep 15 2015, 1:34 PM
TheDJ set Security to None.

Change 238439 merged by jenkins-bot:
Ignore exceptions from document.querySelector()

https://gerrit.wikimedia.org/r/238439

TTO added a subscriber: TTO.Oct 31 2015, 11:12 AM

This is currently listed in MW-1.26-release as a possible release blocker. Did Roan's patch fix this bug, or just sweep it under the carpet for now?

demon added a subscriber: demon.Nov 2 2015, 4:38 PM

I don't think this needs to be a blocker, it was just tagged automatically by the bot since Roan's exception ignoring patch will make it in.

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 4 2015, 3:50 PM
Krinkle closed this task as Resolved.Nov 12 2015, 10:49 PM
Krinkle claimed this task.
Krinkle triaged this task as Medium priority.
Krinkle moved this task from Inbox to Confirmed Problem on the MediaWiki-ResourceLoader board.
Krinkle reassigned this task from Krinkle to Catrope.Aug 18 2016, 8:00 PM