From 95ba5a3def9f1d825b0d2402e8449321edaf0ece Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 11 Jun 2005 09:26:28 +0000 Subject: [PATCH] * (bug 2384) Fix typo in regex for IP address checking --- RELEASE-NOTES | 1 + includes/User.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 34ef2bfb08..9f38cad028 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -276,6 +276,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 2368) Avoid fatally breaking PHP 4.1.2 in a debug line * (bug 2367) Insert correct redirect link record on page move * (bug 2372) Fix rendering of empty-title inline interwiki links +* (bug 2384) Fix typo in regex for IP address checking === Caveats === diff --git a/includes/User.php b/includes/User.php index 103880122c..485e5f6bfe 100644 --- a/includes/User.php +++ b/includes/User.php @@ -137,7 +137,7 @@ class User { * @return bool */ function isIP( $name ) { - return preg_match("/^\d{1,3}\.\d{1,3}.\d{1,3}\.\d{1,3}$/",$name); + return preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/",$name); /*return preg_match("/^ (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\. (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\. -- 2.20.1