Oops! Slightly bad regex causes valid domains to be rejected

This commit is contained in:
Al Beano 2017-08-13 21:54:55 +01:00
parent fcb25f110a
commit bf679b8cef
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ post '/domains/:name/records/add' => sub {
}
}
if (param("rname") !~ m/^(@|([a-zA-Z0-9]([a-zA-Z0-9-_]*[a-zA-Z0-9])\.)*[a-zA-Z0-9]([a-zA-Z0-9-_]*[a-zA-Z0-9])?)$/) {
if (param("rname") !~ m/^(@|([a-zA-Z0-9]([a-zA-Z0-9-_]*[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-_]*[a-zA-Z0-9])?)$/) {
$errs{"e_bad_name"} = 1;
}