Skip to content

Commit 0561054

Browse files
authored
fix: no timestamp update when updating a key (#397)
1 parent 67f4a87 commit 0561054

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Actions/UpdateKey.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ public function __invoke(User $user, int $webauthnKeyId, string $keyName): Model
2020
$webauthnKey = (Webauthn::model())::where('user_id', $user->getAuthIdentifier())
2121
->findOrFail($webauthnKeyId);
2222

23+
// prevent timestamp update
24+
$timestamps = $webauthnKey->timestamps;
25+
$webauthnKey->timestamps = false;
26+
2327
$webauthnKey->name = $keyName;
2428
$webauthnKey->save();
2529

30+
$webauthnKey->timestamps = $timestamps;
31+
2632
return $webauthnKey;
2733
}
2834
}

0 commit comments

Comments
 (0)