mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 00:59:58 +09:00
Fix #1951 update guzzlehttp/guzzle to 6.5.6
This commit is contained in:
parent
d0cdcb5d2a
commit
8d26ca1a90
21 changed files with 402 additions and 89 deletions
|
|
@ -240,6 +240,11 @@ class CookieJar implements CookieJarInterface
|
|||
if (0 !== strpos($sc->getPath(), '/')) {
|
||||
$sc->setPath($this->getCookiePathFromRequest($request));
|
||||
}
|
||||
if (!$sc->matchesDomain($request->getUri()->getHost())) {
|
||||
continue;
|
||||
}
|
||||
// Note: At this point `$sc->getDomain()` being a public suffix should
|
||||
// be rejected, but we don't want to pull in the full PSL dependency.
|
||||
$this->setCookie($sc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,12 +333,19 @@ class SetCookie
|
|||
*/
|
||||
public function matchesDomain($domain)
|
||||
{
|
||||
$cookieDomain = $this->getDomain();
|
||||
if (null === $cookieDomain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Remove the leading '.' as per spec in RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.2.3
|
||||
$cookieDomain = ltrim($this->getDomain(), '.');
|
||||
$cookieDomain = ltrim(strtolower($cookieDomain), '.');
|
||||
|
||||
$domain = strtolower($domain);
|
||||
|
||||
// Domain not set or exact match.
|
||||
if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
|
||||
if ('' === $cookieDomain || $domain === $cookieDomain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue