From 7838eb5866e3c056824fd57f212c8e5fc4bf8695 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 1 May 2015 17:48:02 +0300 Subject: [PATCH] Fix aap-passwd argument checking --- aap-passwd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aap-passwd b/aap-passwd index 69d892d..ac6a7e9 100644 --- a/aap-passwd +++ b/aap-passwd @@ -9,8 +9,8 @@ use Apache2::Authen::Passphrase qw/pwset USER_REGEX/; use IO::Prompter [qw/-e* -stdio/]; -die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 1; -($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if $#ARGV == 1; +die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 2; +($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if @ARGV == 2; my $username = shift; die "Invalid username\n" unless $username =~ USER_REGEX; -- 2.30.2