From e57b8976bb15c8517c6aaa97e90b5ee4145753ff Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 13 Apr 2023 23:07:05 +0200 Subject: [PATCH] fix: [rsync-backup-target] allow adding ssh keys from latest version of openssh --- .../build/src/usr/local/sbin/ssh-admin-cmd-validate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsync-backup-target/build/src/usr/local/sbin/ssh-admin-cmd-validate b/rsync-backup-target/build/src/usr/local/sbin/ssh-admin-cmd-validate index 11c937d..4f8e7cc 100755 --- a/rsync-backup-target/build/src/usr/local/sbin/ssh-admin-cmd-validate +++ b/rsync-backup-target/build/src/usr/local/sbin/ssh-admin-cmd-validate @@ -44,7 +44,7 @@ if [[ "$SSH_ORIGINAL_COMMAND" =~ [\&\(\{\;\<\>\`\$\}] ]]; then reject fi -if [[ "$SSH_ORIGINAL_COMMAND" =~ ^"ssh-key add ssh-rsa "[a-zA-Z0-9/+]+" "[a-zA-Z0-9._-]+"@"[a-zA-Z0-9._-]+""$ ]]; then +if [[ "$SSH_ORIGINAL_COMMAND" =~ ^"ssh-key add ssh-rsa "[a-zA-Z0-9/+=]+" "[a-zA-Z0-9._-]+"@"[a-zA-Z0-9._-]+""$ ]]; then log "ACCEPTED: $SSH_ORIGINAL_COMMAND" ## Interpret \ to allow passing spaces (want to avoid possible issue with \n)