X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FBlock.php;h=05e97b98d91dd635db3f38e5c0a6733f35a09ade;hp=8fc2686305046a03c8a99ecf7f66e4840f168a89;hb=a23183010ed4fe4bfb3e47e29174d59cbe1ec98e;hpb=64b83bdb3afd0ee4f8fc1893a865409c198e601e diff --git a/includes/Block.php b/includes/Block.php index 8fc2686305..05e97b98d9 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1354,7 +1354,7 @@ class Block { self::TYPE_IP ]; - } elseif ( IP::isValidBlock( $target ) ) { + } elseif ( IP::isValidRange( $target ) ) { # Can't create a User from an IP range return [ IP::sanitizeRange( $target ), self::TYPE_RANGE ]; } @@ -1501,7 +1501,7 @@ class Block { return $id; } $hmac = MWCryptHash::hmac( $id, $secretKey, false ); - $cookieValue = $id . '!' . $hmac; + $cookieValue = $id . '!' . $hmac; return $cookieValue; } @@ -1513,7 +1513,7 @@ class Block { * * @param string $cookieValue The string in which to find the ID. * - * @return integer|null The block ID, or null if the HMAC is present and invalid. + * @return int|null The block ID, or null if the HMAC is present and invalid. */ public static function getIdFromCookieValue( $cookieValue ) { // Extract the ID prefix from the cookie value (may be the whole value, if no bang found).