Skip Menu |

This queue is for tickets about the REST-Google-Apps-Provisioning CPAN distribution.

Report information
The Basics
Id: 53407
Status: resolved
Priority: 0/
Queue: REST-Google-Apps-Provisioning

People
Owner: Nobody in particular
Requestors: ianrifkin [...] ianrifkin.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.1.8-1
Fixed in: (no value)



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
Resolved in 1.1.9.