dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6928864
)
Loosen ipv4 check back, this really should be called isLikeIP()
author
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 19 Jun 2008 06:14:53 +0000
(06:14 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Thu, 19 Jun 2008 06:14:53 +0000
(06:14 +0000)
includes/User.php
patch
|
blob
|
history
diff --git
a/includes/User.php
b/includes/User.php
index
6d8c739
..
0f6e797
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-431,13
+431,7
@@
class User {
* @return bool
*/
static function isIP( $name ) {
- return IP::isIPAddress($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]))\.
- (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))\.
- (?:[01]?\d{1,2}|2(:?[0-4]\d|5[0-5]))
- $/x", $name);*/
+ return preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.(?:xxx|\d{1,3})$/',$name) || IP::isIPv6($name);
}
/**