Skip to content

Commit 8a2dd2b

Browse files
committed
#62: Add more precise domain check
1 parent 247528c commit 8a2dd2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Plugin/CookiePlugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
6969
}
7070

7171
// Restrict setting cookie from another domain
72-
if (false === strpos($request->getUri()->getHost(), $cookie->getDomain())) {
72+
if (false === strpos(
73+
'.'.$request->getUri()->getHost(),
74+
'.'.$cookie->getDomain()
75+
)
76+
) {
7377
continue;
7478
}
7579

0 commit comments

Comments
 (0)