Create an option to display error on mail not found (#1225)

environments/ppa-mbqj77/deployments/1
Clément Oudot 8 years ago
parent eb681b57fd
commit b001965707
  1. 24
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
  2. 5
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
  3. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
  4. 1
      lemonldap-ng-manager/site/htdocs/static/languages/en.json
  5. 1
      lemonldap-ng-manager/site/htdocs/static/languages/fr.json
  6. 1
      lemonldap-ng-manager/site/htdocs/static/languages/vi.json
  7. 2
      lemonldap-ng-manager/site/htdocs/static/reverseTree.json
  8. 2
      lemonldap-ng-manager/site/htdocs/static/struct.json
  9. 6
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/MailReset.pm

@ -27,7 +27,7 @@ sub types {
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -651,7 +651,7 @@ sub attributes {
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -1004,7 +1004,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval $s;
my $err = join(
@ -1086,7 +1086,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -1109,7 +1109,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -1432,7 +1432,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval $s;
my $err = join(
@ -1469,7 +1469,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -1817,7 +1817,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -2077,6 +2077,10 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'default' => 1,
'type' => 'bool'
},
'portalErrorOnMailNotFound' => {
'default' => 0,
'type' => 'bool'
},
'portalForceAuthnInterval' => {
'default' => 5,
'type' => 'int'
@ -2146,7 +2150,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(
@ -2816,7 +2820,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
BEGIN {
${^WARNING_BITS} =
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55";
"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05";
}
eval "$s $val";
my $err = join(

@ -369,6 +369,11 @@ sub attributes {
default => 1,
documentation => 'Show error if session is expired',
},
portalErrorOnMailNotFound => {
type => 'bool',
default => 0,
documentation => 'Show error if mail is not found in password reset process',
},
portalOpenLinkInNewWindow => {
type => 'bool',
default => 0,

@ -79,7 +79,8 @@ sub tree {
'portalOpenLinkInNewWindow',
'portalAntiFrame',
'portalPingInterval',
'portalErrorOnExpiredSession'
'portalErrorOnExpiredSession',
'portalErrorOnMailNotFound'
]
}
]

@ -557,6 +557,7 @@
"portalDisplayRegister": "Register new account",
"portalDisplayResetPassword": "Reset password",
"portalErrorOnExpiredSession": "Show error on expired session",
"portalErrorOnMailNotFound": "Show error on mail not found",
"portalForceAuthn": "Force authentication",
"portalForceAuthnInterval": "Force authentication interval",
"portalMenu": "Menu",

@ -557,6 +557,7 @@
"portalDisplayRegister": "Création d'un nouveau compte",
"portalDisplayResetPassword": "Réinitialisation de mot de passe",
"portalErrorOnExpiredSession": "Affiche une erreur si la session est expirée",
"portalErrorOnMailNotFound": "Affiche une erreur si le mail n'est pas trouvé",
"portalForceAuthn": "Authentication forcée",
"portalForceAuthnInterval": "Interval d'authentication forcée",
"portalMenu": "Menu",

@ -557,6 +557,7 @@
"portalDisplayRegister": "Đăng ký tài khoản mới",
"portalDisplayResetPassword": "Đặt lại mật khẩu",
"portalErrorOnExpiredSession": "Show error on expired session",
"portalErrorOnMailNotFound": "Show error on mail not found",
"portalForceAuthn": "Bắt buộc xác thực",
"portalForceAuthnInterval": "Khoảng thời gian bắt buộc xác thực",
"portalMenu": "Menu",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -183,6 +183,12 @@ sub _reset {
"Reset asked for a unvalid user ($req->{mail})");
# To avoid mail enumeration, return OK
# unless portalErrorOnMailNotFound is set
if ( $self->conf->{portalErrorOnMailNotFound} ) {
return PE_MAILNOTFOUND;
}
my $mailTimeout =
$self->conf->{mailTimeout} || $self->conf->{timeout};
my $expTimestamp = time() + $mailTimeout;

Loading…
Cancel
Save