r70536 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70535‎ | r70536 | r70537 >
Date:01:24, 6 August 2010
Author:hartman
Status:reverted
Tags:
Comment:
Follow up r70520. More for loop fixes.
Modified paths:
  • /trunk/phase3/skins/common/password.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/password.js
@@ -21,7 +21,7 @@
2222 /[-_;:\.,'"`~!@#$%\^&\*\(\)\[\]\{\} ]/ ];
2323
2424 var charClasses = 0;
25 - for ( var i in regexes ) {
 25+ for ( var i=0; i< regexes.length; i++ ) {
2626 if ( pwd.match( regexes[i] ) ) {
2727 charClasses++;
2828 }
@@ -44,7 +44,7 @@
4545
4646 function repetitionScore( pwd ) {
4747 var unique = '';
48 - for ( var i in pwd ) {
 48+ for ( var i=0; i< pwd.length; i++ ) {
4949 if ( unique.indexOf( pwd[i] ) < 0 ) {
5050 unique += pwd[i];
5151 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70520JavaScript-based password complexity checker on account creation and password...maxsem19:16, 5 August 2010

Status & tagging log