Index: trunk/phase3/includes/ProxyTools.php |
— | — | @@ -76,10 +76,10 @@ |
77 | 77 | |
78 | 78 | /* collect the originating ips */ |
79 | 79 | # Client connecting to this webserver |
80 | | - if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { |
| 80 | + if ( isset( $_SERVER['REMOTE_ADDR'] ) && IP::canonicalize( $_SERVER['REMOTE_ADDR'] ) ) { |
81 | 81 | $ipchain = array( IP::canonicalize( $_SERVER['REMOTE_ADDR'] ) ); |
82 | 82 | } else { |
83 | | - # Running on CLI? |
| 83 | + # Running on CLI or REMOTE_ADDR is broken |
84 | 84 | $ipchain = array( '127.0.0.1' ); |
85 | 85 | } |
86 | 86 | $ip = $ipchain[0]; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -182,6 +182,8 @@ |
183 | 183 | * Multiple whitespace in TOC anchors is now stripped, for consistency with the |
184 | 184 | link from the edit comment |
185 | 185 | * (bug 19112) Preferences now respects $wgUseExternalEditor, $wgExternalDiffEngine |
| 186 | +* (bug 18173) Login form exception on malformed REMOTE_ADDR, wfGetIP() now falls |
| 187 | + back to 127.0.01 if the IP cannot be determined |
186 | 188 | |
187 | 189 | == API changes in 1.16 == |
188 | 190 | |