Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_var and force_set_var: Guard against invalid user input #994

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

TinCanTech
Copy link
Collaborator

nix.sh/win.sh/busybox.sh never return error from unset when an invalid variable name 'a=b' is used with a value to set, eg. 'c'; This causes EasyRSA to execute:
eval "export a=b=c".

'set_var EASYRSA_PKI=pki' results in $EASYRSA_PKI being set to 'pki=pki-', without error!

Guard against this possible user error with 'case'.

Minor improvements to other input checks.

nix.sh/win.sh/busybox.sh never return error from unset
when an invalid variable name 'a=b' is used with a value
to set, eg. 'c'; This causes EasyRSA to execute:
eval "export a=b=c".

'set_var EASYRSA_PKI=pki' results in $EASYRSA_PKI being
set to 'pki=pki-', without error!

Guard against this possible user error with 'case'.

Minor improvements to other input checks.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech TinCanTech merged commit 2df4ef2 into OpenVPN:master Aug 5, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant