git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23230 44c647ce-9c0f-0410-b52a-842ac1e357ba
@@ -395,7 +395,7 @@ class Zend_Http_Cookie
// Check for either exact match or suffix match
return ($cookieDomain == $host ||
- preg_match("/\.$cookieDomain$/", $host));
+ preg_match('/\.' . preg_quote($cookieDomain) . '$/', $host));
}
/**
@@ -451,6 +451,14 @@ class Zend_Http_CookieTest extends PHPUnit_Framework_TestCase
+ * @group ZF-10506
+ */
+ public function testPregMatchIsQuoted()
+ {
+ $this->assertFalse(Zend_Http_Cookie::matchCookieDomain('foo.bar.com', 'www.foozbar.com'));
+ }
+
+ /**
* Data Providers
*/