mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
fix(client event handler): future lenience
This commit is contained in:
@ -35,8 +35,8 @@ export function defineClientEventHandler<T>(handler: EventHandlerFunction<T>) {
|
||||
const nonceTime = parseInt(nonce);
|
||||
const current = Date.now();
|
||||
if (
|
||||
// If it was generated in the future
|
||||
nonceTime > current ||
|
||||
// If it "will be generated" in thirty seconds
|
||||
nonceTime > current + NONCE_LENIENCE ||
|
||||
// Or more than thirty seconds ago
|
||||
nonceTime < current - NONCE_LENIENCE
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user