diff --git a/back/lib/admin/peer/list b/back/lib/admin/peer/list index f7341fb..731b47f 100755 --- a/back/lib/admin/peer/list +++ b/back/lib/admin/peer/list @@ -15,8 +15,8 @@ # 18: rDNS failed CONFIG_FILE='/etc/wgapi/config' -if ! [ ${#} -eq 1 ] || [ ${#} -eq 2 ]; then - printf 'ERROR! Bad input: %s %s %s\n' "${0}" "${*}" "${#}">>"${LOGFILE}" +if ! [ ${#} -eq 2 ]; then # Only two because even an empty string querystring will be counted + printf 'ERROR! Bad input: %s %s\n' "${0}" "${*}" >>"${LOGFILE}" exit 3 fi & if ! [ -x '/usr/bin/wg' ]; then printf 'ERROR! %s could not find /usr/bin/wg\n' "${0}" >>"${LOGFILE}"