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

email parameter validation

parent 1922265a
Branches
Tags
No related merge requests found
...@@ -35,6 +35,16 @@ sub run { ...@@ -35,6 +35,16 @@ sub run {
my $sp = $self->get_sp(entityid => $entityid); my $sp = $self->get_sp(entityid => $entityid);
return if !$sp; 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 # override metadata contacts if needed
$self->mock_contacts($sp); $self->mock_contacts($sp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment