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

email parameter validation

parent 1922265a
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,16 @@ sub run {
my $sp = $self->get_sp(entityid => $entityid);
return if !$sp;
return $self->abort(
log_message => "Missing parameter: email",
user_message => "missing_email"
) if !$email;
return $self->abort(
log_message => "Invalid parameter: email",
user_message => "invalid_email"
) if $email !~ /^ [\w\-.+]+ @ [\w\-.+]+ $/x;
# override metadata contacts if needed
$self->mock_contacts($sp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment