Skip to content

Commit

Permalink
Flesh out changes, test maint defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 5, 2021
1 parent 1937036 commit f77f1bf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ Revision history for Perl extension PGXN::Manager
0.20.3
- Updated the password hashing to a much slower and therefor more
secure algorithm (blowfish with 9 iterations).
- Changed the minimum password length to 8 characters.
- Added clear_password() SQL function.
- Added the `reset_password` command to pgxn_maint.
- Refactored the password algorithm selection into a function so
that it can more easily be changed in the future.
- Changed the minimum password length from 4 to 8 characters.
- Added clear_password() SQL function as a tool for admins to
set a user password to a random string and create a reset token.
- Added the `reset_password` command to pgxn_maint for admins to use
to clear one or more user passwords and send emails to those users
with links to create new passwords.

0.20.2 2021-06-01T01:48:32Z
- Switched to a more appropriate README icon in the distribution view,
Expand Down
19 changes: 18 additions & 1 deletion t/maint.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;
use warnings;
use utf8;

use Test::More tests => 144;
use Test::More tests => 149;
# use Test::More 'no_plan';
use Test::File;
use File::Path qw(remove_tree);
Expand Down Expand Up @@ -66,6 +66,23 @@ DEFAULT: {
local @ARGV;
is_deeply { $maint->_config }, { verbosity => 0 },
'Default options should be correct';
is $maint->verbosity, 0, 'Default verbosity is 0';
is $maint->expires, '2 days', 'Default expires is 2 days';
is $maint->reason, '', 'Default expires is empty string';
is $maint->base_url, 'https://manager.pgxn.org',
'Default base_url is manager.pgxn.org';
is $maint->admin, do {
require Encode::Locale;
Encode::decode( locale => getlogin )
|| Encode::decode( locale => scalar getpwuid( $< ) )
|| $ENV{ LOGNAME }
|| $ENV{ USER }
|| $ENV{ USERNAME }
|| try {
require Win32;
Encode::decode( locale => Win32::LoginName() )
};
}, 'Default admin should be system username';
}

##############################################################################
Expand Down

0 comments on commit f77f1bf

Please sign in to comment.