Skip to content

Commit

Permalink
Don't quote dollar sign in plugin argument values
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbls committed Apr 24, 2024
1 parent e9abed0 commit 8d49557
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdm-cparse
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,8 @@ function plugin_getargs() {
else
# Turn word-word into word__word. User of the value must handle other end for display
[ "$key" != "${key/-/_}" ] && key="${key//-/__}"
[[ "$value" =~ "$" ]] && value=${value//$/\\$} # Replace $ with \$
# Don't slash-quote dollar signs. Breaks $ in passwords. What breaks if this is disabled?
# [[ "$value" =~ "$" ]] && value=${value//$/\\$} # Replace $ with \$
[ "$key" != "" ] && printf -v "${key}" "%s" "$value" #eval "${key}=\"$value\""
keysfound="${keysfound}|$key"
fi
Expand Down Expand Up @@ -1194,6 +1195,7 @@ function do_delayed_boot_behavior {
fi
# Perform cleanup steps done by /usr/bin/cancel_rename
bootlog "Re-enable getty@tty1"
write_console "Re-enable getty@tty1"
systemctl enable $now $nowb getty@tty1 > /dev/null 2>&1
rm -f /etc/ssh/sshd_config.d/rename_user.conf
}
Expand Down

0 comments on commit 8d49557

Please sign in to comment.