Last modified: 2011-09-22 23:40:46 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 T33102, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31102 - buildTool function uses improper for loop for filters
buildTool function uses improper for loop for filters
Status: RESOLVED DUPLICATE of bug 29106
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-22 18:11 UTC by Jim R. Wilson
Modified: 2011-09-22 23:40 UTC (History)
2 users (show)

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


Attachments

Description Jim R. Wilson 2011-09-22 18:11:51 UTC
This problem affects wikiEditor for MW 1.17 - I have not tried other versions.

In jQuery.wikiEditor.toolbar.js, the buildTool function improperly uses a for..in loop to iterate through an array (specifically, for applying filters).  This works fine as long as nobody has added to the Array.prototype, but if they have the for..in loop will pick up non-integer keys.

Although some JavaScript libraries shy away from making changes to prototypes, there are plenty of legacy ones which still do.  

This bug causes blocking JavaScript errors whenever an addition to Array.prototype has a value which causes jQuery to return a wrapped array instead of an actual jQuery collection.
Comment 1 Jim R. Wilson 2011-09-22 18:39:48 UTC
I just checked out SVN HEAD for this, someone has already fixed it.  Shall I make a patch specifically for 1.17?
Comment 2 Jim R. Wilson 2011-09-22 18:41:55 UTC
It is also fixed in REL_18, so it appears that just 1.17 is affected.
Comment 3 Brion Vibber 2011-09-22 23:40:46 UTC
Resolving as dupe of bug 29106 -- as noted above, this was already fixed on trunk & REL1_18.

*** This bug has been marked as a duplicate of bug 29106 ***

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


Navigation
Links