Skip to content
Snippets Groups Projects
Commit 77369306 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

more explicit error message for invalid value

parent fd58474f
No related branches found
No related tags found
No related merge requests found
...@@ -138,8 +138,8 @@ sub get_sp { ...@@ -138,8 +138,8 @@ sub get_sp {
}x; }x;
return $self->abort( return $self->abort(
log_message => "Incorrect parameter format: entityid", log_message => "Invalid parameter: entityid",
user_message => "format_entityid" user_message => "invalid_entityid"
) if $entityid !~ $pattern; ) if $entityid !~ $pattern;
my $db = $self->stash('db'); my $db = $self->stash('db');
......
...@@ -296,6 +296,10 @@ msgstr "Les attributs eduPersonAffiliation et eduPersonScopedAffiliation sont va ...@@ -296,6 +296,10 @@ msgstr "Les attributs eduPersonAffiliation et eduPersonScopedAffiliation sont va
#: templates/web/edugain/errors.tt2.html:12 templates/web/renater/errors.tt2.html:12 #: templates/web/edugain/errors.tt2.html:12 templates/web/renater/errors.tt2.html:12
msgid "internal error" msgid "internal error"
msgstr "erreur interne" msgstr "erreur interne"
#. (matches.0)
#: templates/web/edugain/errors.html.tt2:35
msgid "invalid parameter '%1'"
msgstr "paramètre invalide '%1'"
#: templates/web/edugain/errors.tt2.html:15 templates/web/renater/errors.tt2.html:15 #: templates/web/edugain/errors.tt2.html:15 templates/web/renater/errors.tt2.html:15
msgid "mail notification failure" msgid "mail notification failure"
......
...@@ -31,8 +31,11 @@ ...@@ -31,8 +31,11 @@
[% ELSIF (matches = error.match('missing_(\w+)')) %] [% ELSIF (matches = error.match('missing_(\w+)')) %]
[% c.loc("missing parameter '[_1]'", matches.0) %] [% c.loc("missing parameter '[_1]'", matches.0) %]
[% ELSIF (matches = error.match('invalid_(\w+)')) %]
[% c.loc("invalid parameter '[_1]'", matches.0) %]
[% ELSE %] [% ELSE %]
[% err %] [% error %]
[% END %] [% END %]
</p> </p>
......
...@@ -28,8 +28,11 @@ ...@@ -28,8 +28,11 @@
[% ELSIF (matches = error.match('missing_(\w+)')) %] [% ELSIF (matches = error.match('missing_(\w+)')) %]
[% c.loc("missing parameter '[_1]'", matches.0) %] [% c.loc("missing parameter '[_1]'", matches.0) %]
[% ELSIF (matches = error.match('invalid_(\w+)')) %]
[% c.loc("invalid parameter '[_1]'", matches.0) %]
[% ELSE %] [% ELSE %]
[% err %] [% error %]
[% END %] [% END %]
</p> </p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment