mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:53:33 +03:00
cookie: compare path case sensitively
Verify with test 1645 Reported-by: Joshua Rogers Closes #21616
This commit is contained in:
parent
71430e87fd
commit
a15cfeb100
3 changed files with 76 additions and 3 deletions
|
|
@ -854,7 +854,7 @@ static bool replace_existing(struct Curl_easy *data,
|
|||
else
|
||||
cllen = strlen(clist->path);
|
||||
|
||||
if(curl_strnequal(clist->path, co->path, cllen)) {
|
||||
if(!strncmp(clist->path, co->path, cllen)) {
|
||||
infof(data, "cookie '%s' for domain '%s' dropped, would "
|
||||
"overlay an existing cookie", co->name, co->domain);
|
||||
return FALSE;
|
||||
|
|
@ -878,7 +878,7 @@ static bool replace_existing(struct Curl_easy *data,
|
|||
/* the domains were identical */
|
||||
|
||||
if(clist->path && co->path &&
|
||||
!curl_strequal(clist->path, co->path))
|
||||
strcmp(clist->path, co->path))
|
||||
replace_old = FALSE;
|
||||
else if(!clist->path != !co->path)
|
||||
replace_old = FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue