Subject: | Doesn't allow for MD5 |
Running script on RHEL with Perl v5.8.8.
When updating or creating a user you can set a plain text password or specify the encoding, which should be MD5 or SHA-1. There appears to be a bug in the module that does not let you set PasswordHashFunction to 'MD5'.
I believe you should be able to do something like:
$google->updateUser(
username => 'jsmith',
passwordHashFunction => 'MD5',
password => 'newpass',
)
When set to 'MD5' (like the above) it will return the error, "Valid passwordHashFunction values are 'MD5' or 'SHA-1'."
On lines 100 and 268 the module checks if PasswordHashFunction has a valid option.
It currently has this coded:
unless ( $arg->{'passwordhashfunction'} eq ( 'SHA-1' || 'MD5' ) ) {
The above will always return 'SHA-1'. Instead the line should be changed to something like the following:
unless ( $arg->{'passwordhashfunction'} eq 'SHA-1' || $arg->{'passwordhashfunction'} eq 'MD5' ) {
I hope that helps! Thank you for the useful script!
Ian
When updating or creating a user you can set a plain text password or specify the encoding, which should be MD5 or SHA-1. There appears to be a bug in the module that does not let you set PasswordHashFunction to 'MD5'.
I believe you should be able to do something like:
$google->updateUser(
username => 'jsmith',
passwordHashFunction => 'MD5',
password => 'newpass',
)
When set to 'MD5' (like the above) it will return the error, "Valid passwordHashFunction values are 'MD5' or 'SHA-1'."
On lines 100 and 268 the module checks if PasswordHashFunction has a valid option.
It currently has this coded:
unless ( $arg->{'passwordhashfunction'} eq ( 'SHA-1' || 'MD5' ) ) {
The above will always return 'SHA-1'. Instead the line should be changed to something like the following:
unless ( $arg->{'passwordhashfunction'} eq 'SHA-1' || $arg->{'passwordhashfunction'} eq 'MD5' ) {
I hope that helps! Thank you for the useful script!
Ian