https://bugzilla.wikimedia.org/show_bug.cgi?id=50919

       Web browser: ---
            Bug ID: 50919
           Summary: Error for invalid on-wiki JavaScript can show wrong
                    filename
           Product: MediaWiki
           Version: 1.22-git
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: ResourceLoader
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to