diff options
author | H. Peter Anvin <hpa@zytor.com> | 2011-10-06 21:27:25 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-10-06 21:27:25 -0700 |
commit | 41a003ca5dab2b832ffb8660866d5e0a9ba4cc31 (patch) | |
tree | b56477abf6b31a6bb5b5093b21f1c490364bf567 | |
parent | fdb0d5ffe2f2c506e867ecce88d2aa45d7979a3b (diff) | |
download | kup-41a003ca5dab2b832ffb8660866d5e0a9ba4cc31.tar.gz |
kup: need to escape literal @ in regexps, correct matching operator
Fix literal @ in regexps and use of != when !~ was intended.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-x | kup | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -172,11 +172,11 @@ sub setup_output() # In batch mode, we dump the output to stdout so the user can # aggregate it best they wish unless ($opt{'batch'}) { - if ($opt{'rsh'} !~ /^([-a-zA-Z0-9._=@:\s]+)$/) { + if ($opt{'rsh'} !~ /^([-a-zA-Z0-9._=\@:\s]+)$/) { die "$0: suspicious KUP_RSH command (if this is bogus let hpa know)\n"; } my $rsh = $1; - if ($opt{'host'} != /^([-a-zA-Z0-9._@]+)$/) { + if ($opt{'host'} !~ /^([-a-zA-Z0-9._\@]+)$/) { die "$0: suspicious KUP_HOST (if this is bogus let hpa know)\n"; } $rsh .= " \Q$1"; |