php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13038 Cookie Error in Net/Curl.php
Submitted: 2001-08-29 13:26 UTC Modified: 2001-10-22 14:53 UTC
From: olaf at sevenval dot de Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.6 OS: all
Private report: No CVE-ID: None
 [2001-08-29 13:26 UTC] olaf at sevenval dot de
In Curl.php around line 316 multiple cookies are concatenated with newline. Shold be semicolon:
if (isset($this->cookies)) {
  foreach ($this->cookies as $name => $value) {
  $cookie_data .= urlencode($name) . ": " .\ urlencode($value);
 $cookie_data .= ";"; // This is correct, before it was "\n"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-30 08:06 UTC] olaf at sevenval dot de
line 319:       
$ret = curl_setopt($ch, CURLOPT_COOKIE, $cookie_data);       
may cause a warning, if cookies is an empty array.       
Better:       
if(!empty($cookie_data){       
 $ret = curl_setopt($ch, CURLOPT_COOKIE, $cookie_data);   }

 [2001-10-22 14:53 UTC] sterling@php.net
fixed in cvs, thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 14:01:30 2024 UTC