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: wikibugs-l@lists.wikimedia.org
          Reporter: listenle...@gmail.com
                CC: krinklem...@gmail.com, matma....@gmail.com,
                    tpars...@wikimedia.org
       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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to