From 4b955a09c2ba09de2925d6a475cfa2ae11209f14 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Sat, 1 Jul 2023 16:00:01 +0200 Subject: [PATCH 1/2] Append captcha in template (#2949) --- .../lib/Lemonldap/NG/Portal/Auth/LDAP.pm | 10 +++------- .../site/templates/bootstrap/password.tpl | 3 +++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm index 08af902e49..3aa6f29793 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/LDAP.pm @@ -12,7 +12,7 @@ use Lemonldap::NG::Portal::Main::Constants qw( PE_PP_CHANGE_AFTER_RESET ); -our $VERSION = '2.0.14'; +our $VERSION = '2.17.0'; # Inheritance: UserDB::LDAP provides all needed ldap functions extends qw( @@ -70,10 +70,7 @@ sub authenticate { } $self->validateLdap; - - unless ( $self->ldap ) { - return PE_LDAPCONNECTFAILED; - } + return PE_LDAPCONNECTFAILED unless $self->ldap; my $res = $self->ldap->userBind( $req, $req->data->{dn}, @@ -87,9 +84,8 @@ sub authenticate { and $self->conf->{ldapAllowResetExpiredPassword} ) ) { - $req->data->{oldpassword} = $req->data->{password}; # Fix 2377 + $req->data->{oldpassword} = $req->data->{password}; $req->data->{noerror} = 1; - $self->setSecurity($req); } return $res; diff --git a/lemonldap-ng-portal/site/templates/bootstrap/password.tpl b/lemonldap-ng-portal/site/templates/bootstrap/password.tpl index 9f53ba52c3..0344c8f6d7 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/password.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/password.tpl @@ -94,6 +94,9 @@ + + +