From d013138f8a1af30d29cd2413f6740346158abc35 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 18 Mar 2019 14:20:48 -0400 Subject: _ob_validate_var_name(): Abort on missing argument --- (limited to 'lib') diff --git a/lib/common.sh b/lib/common.sh index 0f13d1b..82a4519 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -29,7 +29,10 @@ _ob_abort() _ob_validate_var_name() { - case "${1}" in + local name="${1}" + shift 1 || _ob_abort + + case "${name}" in [!a-zA-Z_]*|*[!a-zA-Z0-9_]*) return 1 ;; -- cgit v0.9.1