Page MenuHomePhabricator

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


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.

Event Timeline

TheDJ raised the priority of this task from to Needs Triage.
TheDJ updated the task description. (Show Details)
TheDJ added a subscriber: TheDJ.

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

TheDJ set Security to None.

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

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?

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.

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.