Index: SpecialBlockip.php
===================================================================
--- SpecialBlockip.php	(revision 34636)
+++ SpecialBlockip.php	(working copy)
@@ -338,7 +338,7 @@
 		if( $expirestr == 'other' )
 			$expirestr = $this->BlockOther;
 
-		if (strlen($expirestr) == 0) {
+		if ((strlen($expirestr) == 0) || (strlen($expirestr) > 50)) {
 			return array('ipb_expiry_invalid');
 		}
 
