File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ function generateRandomScrambledPassword() {
515515 // This suffix shouldn't reduce the entropy of the intentionally
516516 // scrambled password.
517517 $ REQUIRED_CHARS = 'A1a ' ;
518- return ( wfGenerateToken () . $ REQUIRED_CHARS );
518+ return ( self :: generateToken () . $ REQUIRED_CHARS );
519519 }
520520
521521 /**
@@ -704,4 +704,13 @@ public static function isAccountDisabled( $user ) {
704704
705705 return (bool ) $ retVal ;
706706 }
707+
708+ /**
709+ * Copypasta from pre-1.23 /includes/GlobalFunctions.php
710+ * @see https://git.wikimedia.org/commitdiff/mediawiki%2Fcore/118567a4ba0ded669f43a58713733cab915afe39
711+ */
712+ public static function generateToken ( $ salt = '' ) {
713+ $ salt = serialize ( $ salt );
714+ return md5 ( mt_rand ( 0 , 0x7fffffff ) . $ salt );
715+ }
707716}
You can’t perform that action at this time.
0 commit comments