Last modified: 2013-07-08 17:55:01 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 T52919, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50919 - Error for invalid on-wiki JavaScript can show wrong filename
Error for invalid on-wiki JavaScript can show wrong filename
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 03:23 UTC by Matthew Flaschen
Modified: 2013-07-08 17:55 UTC (History)
3 users (show)

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


Attachments

Description Matthew Flaschen 2013-07-08 03:23:35 UTC
When on-wiki JavaScript fails JSMin's (JSParser to be exact) validation, it makes the minified script file just throw an error.  This error thrown includes the page name (e.g. User:Example/common.js).

This output is cached, which means if someone copies the JavaScript (e.g. to debug the problem), it will show the wrong filename/page name for that subsequent user.

This usually won't be too hard for a user to figure out (particularly if there's only one copy).  However, the page name could be added to the cache key to fix this.  I don't think this will have too much of a performance impact.  There generally shouldn't be many identical copies of a script (there are certainly scripts widely imported, though).
Comment 1 Brion Vibber 2013-07-08 17:55:01 UTC
Sounds reasonable...

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


Navigation
Links