Zend Framework

Cookies from hosts starting with a dot are inaccessible with getCookie()

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.10.0
  • Fix Version/s: None
  • Labels:
    None

Description

I am building a simple tool which can access the contactlist from a MSN Live account but something is bugging me. I am using a Zend_Http_Client object to do all the calls and I am using the Zend_Http_Cookiejar to store cookies in. During the calls the cookies get properly saved with host ".live.com" so they are accessible from all subdomains. I tried getting the cookie by:

$cookiejar = $client->getCookieJar();
$authcookie = $cookiejar->getCookie('http://.live.com', 'MSPAuth');

This gives me an Exception with "Invalid URI supplied" as message. When i remove the dot from the URI I don't get an exception but the CookieJar won't return the cookie since the host doesnt match (live.com != .live.com). When I remove the check for the hostname in Zend_Uri the ".live.com" hostname is working fine like this:

$uri = Zend_Uri::factory();
$uri->setHost('.live.com');
$authcookie = $cookiejar->getCookie($uri, 'MSPAuth');

Please fix, tnx

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: