From: Aaron Schulz Date: Wed, 13 Aug 2008 22:29:17 +0000 (+0000) Subject: I really don't like the idea of invalid IPs sending these passwords out X-Git-Tag: 1.31.0-rc.0~45914 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=cd5d48fa4a1a047e293698586f9deb2edbcbe467;p=lhc%2Fweb%2Fwiklou.git I really don't like the idea of invalid IPs sending these passwords out --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 99ba68e027..13df18a4b7 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -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 );