(bug 28017) Unblocking a user with a space in their name does not work. This fix...
authorHappy-melon <happy-melon@users.mediawiki.org>
Sat, 12 Mar 2011 23:54:32 +0000 (23:54 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sat, 12 Mar 2011 23:54:32 +0000 (23:54 +0000)
includes/specials/SpecialIpblocklist.php

index 18f15d1..81c4643 100644 (file)
@@ -211,6 +211,9 @@ class IPUnblockForm extends SpecialPage {
                                }
                                $ip = $block->getRedactedName();
                        } else {
+                               # FIXME: do proper sanitisation/cleanup here
+                               $ip = str_replace( '_', ' ', $ip );
+
                                $block = Block::newFromDB( $ip );
                                if ( !$block ) {
                                        return array( 'ipb_cant_unblock', htmlspecialchars( $id ) );