diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-12 12:08:10 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-12 12:08:10 (EDT) |
commit | f67cff9b17798b41429e8382ffd15f4d1a2b854f (patch) | |
tree | 47865d6112cf5cbe520458a964c8b85b8e54bef6 /lib | |
parent | b857ead4151b087cff6395a4c08f0d954bbf53fd (diff) |
ob_set_substvar(): Don't allow "_" in variable names
The character was allowed due to the details of the implementation, but
the SPF 2.0 specification doesn't allow it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/control.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/control.sh b/lib/control.sh index 5be3fbe..a792486 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -207,10 +207,10 @@ ob_set_substvar() fi # Convert variable name to uppercase and validate. - name="$(echo "${name}" | tr 'a-z-' 'A-Z_')" - case "${name}" in *[!A-Z0-9_]* | '') + case "${name}" in *[!A-Za-z0-9-]* | '') return 125 esac + name="$(echo "${name}" | tr 'a-z-' 'A-Z_')" # Trim leading and trailing whitespace from value. read -r value <<-EOF |