From ca3310f2bce7b4a84284c3ad6395c5c66d71825b Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Sat, 12 Mar 2011 23:54:32 +0000 Subject: [PATCH] (bug 28017) Unblocking a user with a space in their name does not work. This fix is no more ghastly than the rest of the code in the file; the whole thing (as usual) needs a complete rewrite... --- includes/specials/SpecialIpblocklist.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index 18f15d1de3..81c4643a06 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -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 ) ); -- 2.20.1