On Thu, Jun 19, 2008 at 2:14 AM, aaron@svn.wikimedia.org wrote:
Log Message:
Loosen ipv4 check back, this really should be called isLikeIP()
. . . 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);
What's the rationale for this change?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Simetrical wrote:
On Thu, Jun 19, 2008 at 2:14 AM, aaron@svn.wikimedia.org wrote:
Log Message:
Loosen ipv4 check back, this really should be called isLikeIP()
. . . 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);
What's the rationale for this change?
Per the commit message, this restores it to previous behavior, which marked certain IP-like patterns that aren't valid IPs as "IPs" for purposes of, for instance, forbidding them as usernames.
- -- brion
On Thu, Jun 19, 2008 at 6:03 PM, Brion Vibber brion@wikimedia.org wrote:
Per the commit message, this restores it to previous behavior, which marked certain IP-like patterns that aren't valid IPs as "IPs" for purposes of, for instance, forbidding them as usernames.
To stop people from being confused about whether 65.91.3.257 is an anonymous user, I guess?
Simetrical schrieb:
On Thu, Jun 19, 2008 at 6:03 PM, Brion Vibber brion@wikimedia.org wrote:
Per the commit message, this restores it to previous behavior, which marked certain IP-like patterns that aren't valid IPs as "IPs" for purposes of, for instance, forbidding them as usernames.
To stop people from being confused about whether 65.91.3.257 is an anonymous user, I guess?
I more think about IPv6 addresses here... does mediawiki support ipv6, btw?
Marco
On Fri, Jun 20, 2008 at 6:35 PM, Marco Schuster marco@harddisk.is-a-geek.org wrote:
I more think about IPv6 addresses here... does mediawiki support ipv6, btw?
In theory, yes. Squid doesn't, though, or so I've been told. (Does Varnish?)
wikitech-l@lists.wikimedia.org