From 24752788acd22393fa66f808355342074cfc1c07 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 4 Jun 2006 23:48:20 +0000 Subject: [PATCH] Clarified purpose of User::isIP(), see bug 6198. --- includes/User.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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. -- 2.20.1