Index: trunk/phase3/includes/User.php |
— | — | @@ -201,6 +201,14 @@ |
202 | 202 | || strlen( $name ) > $wgMaxNameChars |
203 | 203 | || $name != $wgContLang->ucfirst( $name ) ) |
204 | 204 | return false; |
| 205 | + |
| 206 | + // Ensure that the name can't be misresolved as a different title, |
| 207 | + // such as with extra namespace keys at the start. |
| 208 | + $parsed = Title::newFromText( $name ); |
| 209 | + if( is_null( $parsed ) |
| 210 | + || $parsed->getNamespace() |
| 211 | + || strcmp( $name, $parsed->getPrefixedText() ) ) |
| 212 | + return false; |
205 | 213 | else |
206 | 214 | return true; |
207 | 215 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -214,6 +214,8 @@ |
215 | 215 | localizable as 'datedefault' message. Tweaked lots of languages files... |
216 | 216 | * Added local message cache feature ($wgLocalMessageCache), to reduce bandwidth |
217 | 217 | requirements to the memcached server. |
| 218 | +* Forbid usernames that can be interpreted as titles with namespaces, as that |
| 219 | + leads to hard-to-manage names. |
218 | 220 | |
219 | 221 | === Caveats === |
220 | 222 | |