Update makeuser

This change should escape special characters in the SSH key before they are passed to sed.
This commit is contained in:
deepend-tildeclub 2023-09-24 15:57:04 -06:00 committed by GitHub
parent 642debc22d
commit 42339d3f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ is_banned() {
move_to_current() { move_to_current() {
grep -E "makeuser\s+$1\s+$2\s+\"$3\"" /var/signups >> /var/signups_current grep -E "makeuser\s+$1\s+$2\s+\"$3\"" /var/signups >> /var/signups_current
sed -i "/makeuser\s\+$1\s\+$2\s\+\"$3\"/d" /var/signups sed -i "/makeuser\s\+$1\s\+$2\s\+\"$(echo "$3" | sed -e 's/[]\/$*.^[]/\\&/g')\"/d" /var/signups
} }
case $1 in case $1 in