On Thu, Jul 3, 2008 at 9:00 AM, <demon(a)svn.wikimedia.org> wrote:
Log Message:
-----------
Bug 14088 - excessively long block expiry times no longer bork the logpage. Reject if
over 50 chars.
. . .
- if (strlen($expirestr) == 0) {
+ if ((strlen($expirestr) == 0) || (strlen($expirestr) > 50)) {
return array('ipb_expiry_invalid');
* You should use a named constant instead of the magic number 50.
* The contents of 'ipb_expiry_invalid' should clarify that block
expiry times can't be longer than 50 chars.
* Shouldn't this be using mb_strlen or some equivalent, not strlen?
* Are you really sure that no default block time, in any language, on
any wiki, will ever be more than 50 characters long? It would be best
to only do this check if it's a custom duration. (As far as I'm
reading it, this is not currently the case.)