mirror of
https://github.com/zerotier/ztchooks.git
synced 2026-05-22 16:29:29 -07:00
check for NaN
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ function decode(pairs: string[], toleranceSeconds: number): signedHeader {
|
||||
|
||||
if (item == "t") {
|
||||
var timestamp = parseInt(value, 10);
|
||||
if (timestamp == undefined) {
|
||||
if (timestamp == undefined || isNaN(timestamp)) {
|
||||
throw "Invalid Header";
|
||||
}
|
||||
sh.timestamp = timestamp;
|
||||
|
||||
Reference in New Issue
Block a user