From: Tim Starling Date: Sun, 4 Jun 2006 23:48:20 +0000 (+0000) Subject: Clarified purpose of User::isIP(), see bug 6198. X-Git-Tag: 1.31.0-rc.0~56897 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=24752788acd22393fa66f808355342074cfc1c07;p=lhc%2Fweb%2Fwiklou.git Clarified purpose of User::isIP(), see bug 6198. --- diff --git a/includes/User.php b/includes/User.php index 15d469a5a8..4450b665ea 100644 --- a/includes/User.php +++ b/includes/User.php @@ -188,9 +188,14 @@ class User { } /** - * does the string match an anonymous IPv4 address? + * Does the string match an anonymous IPv4 address? * - * Note: We match \d{1,3}\.\d{1,3}\.\d{1,3}\.xxx as an anonymous IP + * This function exists for username validation, in order to reject + * usernames which are similar in form to IP addresses. Strings such + * as 300.300.300.300 will return true because it looks like an IP + * address, despite not being strictly valid. + * + * We match \d{1,3}\.\d{1,3}\.\d{1,3}\.xxx as an anonymous IP * address because the usemod software would "cloak" anonymous IP * addresses like this, if we allowed accounts like this to be created * new users could get the old edits of these anonymous users.