diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm index 2767426b6..75a6e9b93 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm @@ -278,7 +278,10 @@ sub _reset { $self->userLogger->notice( 'Reset mail already sent to ' . $req->{user} ); - # To avoid enumeration, return OK + # Return mail already sent only if it is allowed at previous step + if ( $self->conf->{portalErrorOnMailNotFound} ) { + return PE_MAILCONFIRMATION_ALREADY_SENT; + } return PE_MAILCONFIRMOK; } diff --git a/lemonldap-ng-portal/site/templates/bootstrap/mail.tpl b/lemonldap-ng-portal/site/templates/bootstrap/mail.tpl index c926dfa77..c3d7fceeb 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/mail.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/mail.tpl @@ -66,6 +66,10 @@ " name="mail"> + + " /> + +

Resend confirmation mail?