Merge branch 'v2.0' into issue-2673-CAS-multiple-service-URL

This commit is contained in:
Clément OUDOT 2022-01-23 16:41:18 +01:00
commit 3c0f374c29
3 changed files with 9 additions and 14 deletions

View File

@ -38,12 +38,8 @@ LL::NG can use two tables:
Authentication table and user table can be the same.
The password can be in plain text, or encoded with a standard SQL
method:
- SHA
- SHA1
- MD5
The password can be in plain text, or encoded with a SQL method (for example
``SHA``, ``SHA1``, ``MD5`` or any method valid on database side).
Example 1: two tables
^^^^^^^^^^^^^^^^^^^^^
@ -159,7 +155,8 @@ Password
~~~~~~~~
- **Hash schema**: SQL method for hashing password. Can be left blank
for plain text passwords.
for plain text passwords. The method will be forced to uppercase in
SQL statement.
- **Dynamic hash activation**: Activate dynamic hashing. With dynamic
hashing, the hash scheme is recovered from the user password in the
database during authentication.

View File

@ -1,6 +1,6 @@
package Lemonldap::NG::Manager::Api::Common;
our $VERSION = '2.0.12';
our $VERSION = '2.0.14';
package Lemonldap::NG::Manager::Api;
@ -134,7 +134,7 @@ sub _translateValueApiToConf {
# additionalAudiences is handled as an array
elsif ( $optionName eq 'additionalAudiences' ) {
die "postLogoutRedirectUris is not an array\n"
die "additionalAudiences is not an array\n"
unless ( ref($optionValue) eq "ARRAY" );
return join( ' ', @{$optionValue} );
}

View File

@ -12,7 +12,7 @@ use Mouse;
extends 'Lemonldap::NG::Common::Module';
our $VERSION = '2.0.0';
our $VERSION = '2.0.14';
# PROPERTIES
@ -91,16 +91,14 @@ sub init {
# @return SQL statement string
sub hash_password {
my ( $self, $password, $hash ) = @_;
if ( $hash =~ /^(md5|sha|sha1|encrypt)$/i ) {
if ($hash) {
$self->logger->debug( "Using " . uc($hash) . " to hash password" );
return uc($hash) . "($password)";
}
else {
$self->logger->notice(
"No valid password hash, using clear text for password");
$self->logger->debug("No password hash, using clear text for password");
return $password;
}
}
# Return hashed password for use in SQL SELECT statement