hydra-create-user: Warn that creating users with a plaintext password is deprecated

This commit is contained in:
Graham Christensen
2022-01-21 12:56:15 -05:00
parent 98928a4125
commit 0eeced7f08
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ subtest "Handling password and password hash creation" => sub {
subtest "Creating a user with a plain text password (insecure) stores the password securely" => sub {
my ($res, $stdout, $stderr) = captureStdoutStderr(5, ("hydra-create-user", "plain-text-user", "--password", "foobar"));
is($res, 0, "hydra-create-user should exit zero");
like($stderr, qr/Submitting plaintext passwords as arguments is deprecated and will be removed/, "Submitting a plain text password is deprecated.");
my $user = $db->resultset('Users')->find({ username => "plain-text-user" });
isnt($user, undef, "The user exists");