Skip to content

Commit 0594fc9

Browse files
authored
Update main.sh (hestiacp#3967)
Raise characters limit in regex used in function is_fw_port_format_valid and modify error message
1 parent fdb4fa2 commit 0594fc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,8 @@ is_fw_port_format_valid() {
10381038
check_result "$E_INVALID" "invalid port format :: $1"
10391039
fi
10401040
else
1041-
if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,30}[0-9]$ ]]; then
1042-
check_result "$E_INVALID" "invalid port format :: $1"
1041+
if ! [[ "$1" =~ ^[0-9][-|,|:|0-9]{0,76}[0-9]$ ]]; then
1042+
check_result "$E_INVALID" "invalid port format and/or more than 78 chars used :: $1"
10431043
fi
10441044
fi
10451045
}

0 commit comments

Comments
 (0)