mirror of
https://github.com/mirror/wget.git
synced 2025-02-01 15:20:08 +08:00
Fix behaviour to match RFC 6265 on encountering domain mismatch.
This commit is contained in:
parent
3be7e0a53c
commit
6443581d72
@ -1,3 +1,8 @@
|
|||||||
|
2013-02-15 Darshit Shah <darnir@gmail.com>
|
||||||
|
|
||||||
|
* cookies.c (cookie_handle_set_cookie): Set cookie-descard_requested
|
||||||
|
to true on domain mismatch.
|
||||||
|
|
||||||
2012-12-20 Tim Ruehsen <tim.ruehsen@gmx.de>
|
2012-12-20 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
* gnutls.c (ssl_connect_wget): added +VERS-SSL3.0 to fix
|
* gnutls.c (ssl_connect_wget): added +VERS-SSL3.0 to fix
|
||||||
|
@ -673,9 +673,6 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
|
|||||||
|
|
||||||
if (!cookie->domain)
|
if (!cookie->domain)
|
||||||
{
|
{
|
||||||
copy_domain:
|
|
||||||
/* If the domain was not provided, we use the one we're talking
|
|
||||||
to, and set exact match. */
|
|
||||||
cookie->domain = xstrdup (host);
|
cookie->domain = xstrdup (host);
|
||||||
cookie->domain_exact = 1;
|
cookie->domain_exact = 1;
|
||||||
/* Set the port, but only if it's non-default. */
|
/* Set the port, but only if it's non-default. */
|
||||||
@ -687,11 +684,12 @@ cookie_handle_set_cookie (struct cookie_jar *jar,
|
|||||||
if (!check_domain_match (cookie->domain, host))
|
if (!check_domain_match (cookie->domain, host))
|
||||||
{
|
{
|
||||||
logprintf (LOG_NOTQUIET,
|
logprintf (LOG_NOTQUIET,
|
||||||
_("Cookie coming from %s attempted to set domain to %s\n"),
|
_("Cookie coming from %s attempted to set domain to "),
|
||||||
quotearg_style (escape_quoting_style, host),
|
quotearg_style (escape_quoting_style, host));
|
||||||
|
logprintf (LOG_NOTQUIET,
|
||||||
|
_("%s\n"),
|
||||||
quotearg_style (escape_quoting_style, cookie->domain));
|
quotearg_style (escape_quoting_style, cookie->domain));
|
||||||
xfree (cookie->domain);
|
cookie->discard_requested = true;
|
||||||
goto copy_domain;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user