From 6bee67c723d9720fc1b289b208ec5e1a9481a206 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 19 Jun 2014 23:59:51 +0300 Subject: [PATCH] Argument length increase. Fixes #165 --- func/main.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index 93cb4caa1..6864545cb 100644 --- a/func/main.sh +++ b/func/main.sh @@ -740,11 +740,16 @@ validate_format_mhdmw() { # proxy extention or DNS record validate_format_common() { exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]" - if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then + if [[ "$1" =~ $exclude ]]; then echo "Error: $2 $1 is not valid" log_event "$E_INVALID" "$EVENT" exit $E_INVALID fi + if [ 400 -le ${#1} ]; then + echo "Error: $2 $1 is too long" + log_event "$E_INVALID" "$EVENT" + exit $E_INVALID + fi } # DNS record value