Skip to content

Commit 2b4cffe

Browse files
committed
Change the JtiReplayDetector to use a hash rather than a full URL.
1 parent 7162a2c commit 2b4cffe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

solid/lib/JtiReplayDetector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ public function __construct(private DateInterval $interval, private IDBConnectio
2222

2323
public function detect(string $jti, string $targetUri): bool
2424
{
25+
$hash = sha1($targetUri);
26+
2527
// @TODO: $this->rotateBuckets();
26-
$has = $this->has($jti, $targetUri);
28+
$has = $this->has($jti, $hash);
2729

2830
if ($has === false) {
29-
$this->store($jti, $targetUri);
31+
$this->store($jti, $hash);
3032
}
3133

3234
return $has;

0 commit comments

Comments
 (0)