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

            Bug ID: 69835
           Summary: mediawiki.language.numbers.js can trigger an endless
                    loop
           Product: MediaWiki
           Version: 1.24-git
          Hardware: All
                OS: All
            Status: NEW
          Keywords: i18n
          Severity: normal
          Priority: Unprioritized
         Component: JavaScript
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
       Web browser: ---
   Mobile Platform: ---

The helper function replicate in mediawiki.language.numbers.js has an endless
loop:

        while (num) {
            buf.push( str );
            str += str;
        }

Steps to reproduce (make sure you have no unsaved changes in your browser if
you need to kill it!):

1. Open the JavaScript console
2. Load the module with
 mw.loader.load('mediawiki.language.numbers');
3. After it has loaded, execute
 mw.language.commafy(1234.567, '###0.#####');

This should return something like '1234,567' (depending on the language of the
wiki), but instead triggers that endless loop, which will either freeze the
browser or produce an error message like "InternalError: allocation size
overflow".

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