File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -321,14 +321,16 @@ public function validateDpop($dpop, $request) {
321321 // 7. the "htu" claims matches the HTTP URI value for the HTTP request
322322 // in which the JWT was received, ignoring any query and fragment
323323 // parts,
324- $ requestedPath = (string )$ request ->getUri ();
325- $ requestedPath = preg_replace ("/[?#].*$/ " , "" , $ requestedPath );
326324
327- //error_log("REQUESTED HTU $htu");
328- //error_log("REQUESTED PATH $requestedPath");
329- if ($ htu != $ requestedPath ) {
330- throw new InvalidTokenException ("htu does not match requested path " );
331- }
325+ $ requestedPath = (string )$ request ->getUri ();
326+ $ requestedPath = preg_replace ("/[?#].*$/ " , "" , $ requestedPath );
327+ $ htuClean = preg_replace ("/[?#].*$/ " , "" , $ htu );
328+ // error_log("REQUESTED HTU $htu");
329+ // error_log("REQUESTED HTU cleaned $htuClean");
330+ // error_log("REQUESTED PATH $requestedPath");
331+ if ($ htuClean != $ requestedPath ) {
332+ throw new InvalidTokenException ("htu does not match requested path " );
333+ }
332334
333335 // 8. the token was issued within an acceptable timeframe (see Section 9.1), and
334336
You can’t perform that action at this time.
0 commit comments