From 6784f598b690a160d14a0ea5521106db94d941f0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 29 Jun 2010 03:49:35 +0000 Subject: [PATCH] Let CookieJar work for hostnames without dots in them, so that ApiTest can work on my test wiki (and presumably most other localhost wikis). --- includes/HttpFunctions.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 1dc9859648..3f571cfabb 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -560,9 +560,6 @@ class Cookie { $dc = explode(".", $domain); - // Don't allow cookies for "localhost", "ls" or other dot-less hosts - if( count($dc) < 2 ) return false; - // Only allow full, valid IP addresses if( preg_match( '/^[0-9.]+$/', $domain ) ) { if( count( $dc ) != 4 ) return false; @@ -707,7 +704,6 @@ class CookieJar { } elseif ( !Cookie::validateCookieDomain( $attr['domain'], $domain ) ) { return null; } - $this->setCookie( $name, $value, $attr ); } } -- 2.20.1