From 56e142706aed7cd482b4b78babedb05ac6497b10 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 3 Jul 2008 13:00:12 +0000 Subject: [PATCH] Bug 14088 - excessively long block expiry times no longer bork the logpage. Reject if over 50 chars. --- RELEASE-NOTES | 2 ++ includes/specials/SpecialBlockip.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bc60b96218..7186bf1f24 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -414,6 +414,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN on Special:Newpages. * (bug 12716) Trying to unprotect a title that isn't protected no longer generates a log entry. +* (bug 14088) Excessively long block expiry times are rejected as invalid, + keeps the log page from being distorted. === API changes in 1.13 === diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 5ea25ca46a..52829d920d 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -339,7 +339,7 @@ class IPBlockForm { if( $expirestr == 'other' ) $expirestr = $this->BlockOther; - if (strlen($expirestr) == 0) { + if ((strlen($expirestr) == 0) || (strlen($expirestr) > 50)) { return array('ipb_expiry_invalid'); } -- 2.20.1