Skip to content

Commit f5fa894

Browse files
committed
jti detection on stripped uri without query params
1 parent 1d1160e commit f5fa894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/DPop.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public function validateDpop($dpop, $request) {
323323
// parts,
324324

325325
$requestedPath = (string)$request->getUri();
326-
$requestedPath = preg_replace("/[?#].*$/", "", $requestedPath);
326+
$requestedPath = preg_replace("/[?#].*$/", "", $requestedPath); // Used in htu and jti check;
327327
$htuClean = preg_replace("/[?#].*$/", "", $htu);
328328
// error_log("REQUESTED HTU $htu");
329329
// error_log("REQUESTED HTU cleaned $htuClean");
@@ -346,7 +346,7 @@ public function validateDpop($dpop, $request) {
346346
if ($jti === null) {
347347
throw new InvalidTokenException("jti is missing");
348348
}
349-
$isJtiValid = $this->jtiValidator->validate($jti, (string) $request->getUri());
349+
$isJtiValid = $this->jtiValidator->validate($jti, $requestedPath);
350350
if (! $isJtiValid) {
351351
throw new InvalidTokenException("jti is invalid");
352352
}

0 commit comments

Comments
 (0)