mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 13:27:49 +08:00
added time traveler detection
This commit is contained in:
parent
fc995e0baa
commit
03d850b4aa
1 changed files with 4 additions and 0 deletions
|
@ -108,6 +108,10 @@ class ResultController {
|
|||
return res.status(400).json({ message: "Duplicate result" });
|
||||
}
|
||||
|
||||
if (result.timestamp > Date.now()) {
|
||||
return res.status(400).json({ message: "Time traveler detected" });
|
||||
}
|
||||
|
||||
try {
|
||||
result.keySpacingStats = {
|
||||
average:
|
||||
|
|
Loading…
Reference in a new issue