diff options
Diffstat (limited to 'guzzlehttp/guzzle/src/Cookie/CookieJar.php')
-rw-r--r-- | guzzlehttp/guzzle/src/Cookie/CookieJar.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/guzzlehttp/guzzle/src/Cookie/CookieJar.php index d6757c65..6ef8e8c1 100644 --- a/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -241,6 +241,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); } } |