Fix outbound confirmation and verification safety
This commit is contained in:
1 parent
b17bd09194
commit
67a461452c
20 files changed
+313
-74
No files matched your search
+1
-1
@@ -533,7 +533,7 @@ export function parseHoseExpireSeconds(
|
||||
}
|
||||
|
||||
const seconds = Math.round(expireSeconds(token));
|
||||
if (seconds <= 0) {
|
||||
if (!Number.isFinite(seconds) || seconds <= 0) {
|
||||
throw usageError(`Invalid --expire: 计算得 ${seconds} 秒。必须为大于 0 的有效时长。`);
|
||||
}
|
||||
return seconds;
|
||||
|
||||
Reference in new issue
Block a user