Skip to content

Commit 84b0a2b

Browse files
committed
Older PHP compatibility
1 parent 62c0786 commit 84b0a2b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/AuthenticationService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ public function getLoginRedirect(ServerRequestInterface $request): ?string
421421
$normalized = str_replace('\\', '/', $value);
422422

423423
// A leading run of `//` or `\\` are rejected
424-
if (str_starts_with($normalized, '//')) {
424+
if (strpos($normalized, '//') === 0) {
425425
return null;
426426
}
427427

@@ -433,7 +433,7 @@ public function getLoginRedirect(ServerRequestInterface $request): ?string
433433
return null;
434434
}
435435
$parsed += ['path' => '/', 'query' => ''];
436-
if (str_contains($parsed['path'], '\\')) {
436+
if (strpos($parsed['path'], '\\') !== false) {
437437
return null;
438438
}
439439
if (strlen($parsed['path']) && $parsed['path'][0] !== '/') {

0 commit comments

Comments
 (0)