I really don't like the idea of invalid IPs sending these passwords out
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 13 Aug 2008 22:29:17 +0000 (22:29 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 13 Aug 2008 22:29:17 +0000 (22:29 +0000)
includes/specials/SpecialUserlogin.php

index 99ba68e..13df18a 100644 (file)
@@ -651,7 +651,10 @@ class LoginForm {
                $u->saveSettings();
 
                $ip = wfGetIP();
-               if ( '' == $ip ) { $ip = '(Unknown)'; }
+               if( !$ip ) {
+                       return new WikiError( wfMsg( 'badipaddress' ) );
+               }
+               #if ( '' == $ip ) { $ip = '(Unknown)'; }
 
                $m = wfMsg( $emailText, $ip, $u->getName(), $np, $wgServer . $wgScript );
                $result = $u->sendMail( wfMsg( $emailTitle ), $m );