Argument length increase. Fixes #165

This commit is contained in:
Serghey Rodin 2014-06-19 23:59:51 +03:00
commit 6bee67c723

View file

@ -740,11 +740,16 @@ validate_format_mhdmw() {
# proxy extention or DNS record # proxy extention or DNS record
validate_format_common() { validate_format_common() {
exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]" exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then if [[ "$1" =~ $exclude ]]; then
echo "Error: $2 $1 is not valid" echo "Error: $2 $1 is not valid"
log_event "$E_INVALID" "$EVENT" log_event "$E_INVALID" "$EVENT"
exit $E_INVALID exit $E_INVALID
fi 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 # DNS record value