Skip to content

Commit 6bee67c

Browse files
committed
Argument length increase. Fixes hestiacp#165
1 parent 3b7eee4 commit 6bee67c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

func/main.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,11 +740,16 @@ validate_format_mhdmw() {
740740
# proxy extention or DNS record
741741
validate_format_common() {
742742
exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
743-
if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then
743+
if [[ "$1" =~ $exclude ]]; then
744744
echo "Error: $2 $1 is not valid"
745745
log_event "$E_INVALID" "$EVENT"
746746
exit $E_INVALID
747747
fi
748+
if [ 400 -le ${#1} ]; then
749+
echo "Error: $2 $1 is too long"
750+
log_event "$E_INVALID" "$EVENT"
751+
exit $E_INVALID
752+
fi
748753
}
749754

750755
# DNS record value

0 commit comments

Comments
 (0)