fix: initialize optional origin port
This commit is contained in:
+4
-1
@@ -1012,7 +1012,10 @@ validate_listen_port() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validate_public_origin() {
|
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
|
case "$value" in
|
||||||
http://*|https://*) ;;
|
http://*|https://*) ;;
|
||||||
*) die '公开访问地址必须是 http:// 或 https:// 地址' ;;
|
*) die '公开访问地址必须是 http:// 或 https:// 地址' ;;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tallynote",
|
"name": "tallynote",
|
||||||
"version": "1.1.17",
|
"version": "1.1.18",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.6",
|
"packageManager": "pnpm@9.0.6",
|
||||||
|
|||||||
@@ -424,6 +424,9 @@ bash -c '
|
|||||||
stat_uid() { printf "0"; }
|
stat_uid() { printf "0"; }
|
||||||
stat_mode_bits() { printf "384"; }
|
stat_mode_bits() { printf "384"; }
|
||||||
validate_public_origin "http://[2001:db8::10]:3000"
|
validate_public_origin "http://[2001:db8::10]:3000"
|
||||||
|
# A standard HTTPS origin may omit its default port; this must remain valid
|
||||||
|
# under the installer strict unset-variable mode.
|
||||||
|
validate_public_origin "https://example.test"
|
||||||
' _ "$installer_lib"
|
' _ "$installer_lib"
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'TALLYNOTE_HOST=0.0.0.0' \
|
'TALLYNOTE_HOST=0.0.0.0' \
|
||||||
|
|||||||
Reference in New Issue
Block a user