Commit 99930ca5 authored by bugreport%peshkin.net's avatar bugreport%peshkin.net

Bug 113459 Bad regexp in emailregexp causes system lockout

parent 43294997
......@@ -449,10 +449,17 @@ sub check_webdotbase {
return "";
}
sub checkregexp {
my ($value) = (@_);
eval { qr/$value/ };
return $@;
}
DefParam("emailregexp",
'This defines the regexp to use for legal email addresses. The default tries to match fully qualified email addresses. Another popular value to put here is <tt>^[^@]+$</tt>, which means "local usernames, no @ allowed."',
"t",
q:^[^@]+@[^@]+\\.[^@]+$:);
q:^[^@]+@[^@]+\\.[^@]+$:,
\&checkregexp);
DefParam("emailregexpdesc",
"This describes in english words what kinds of legal addresses are allowed by the <tt>emailregexp</tt> param.",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment