fix: initialize optional origin port
TallyNote release / linux-x64 (push) Successful in 6m49s

This commit is contained in:
Qiufeng
2026-09-03 08:22:46 +08:00
parent 6a0d9e34dd
commit 0690fe298c
3 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -1012,7 +1012,10 @@ validate_listen_port() {
}
validate_public_origin() {
local value=$1 authority host path_part origin_port suffix
# Keep the optional origin port defined under `set -u`. Origins without an
# explicit port (for example https://example.test) are valid and should
# proceed to the default-port handling below.
local value=$1 authority host path_part origin_port='' suffix
case "$value" in
http://*|https://*) ;;
*) die '公开访问地址必须是 http:// 或 https:// 地址' ;;