Fix outbound confirmation and verification safety

This commit is contained in:
gitea committed 2026-10-12 00:13:22 +08:00
1 parent b17bd09194
commit 67a461452c
20 files changed
+313 -74

No files matched your search

+1 -1
View File
@@ -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;