From bf679b8cef3fe1dc855ef762d82097cc36a00413 Mon Sep 17 00:00:00 2001 From: Al Beano Date: Sun, 13 Aug 2017 21:54:55 +0100 Subject: [PATCH] Oops! Slightly bad regex causes valid domains to be rejected --- lib/cyberman/Records.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cyberman/Records.pm b/lib/cyberman/Records.pm index 038f162..285f029 100644 --- a/lib/cyberman/Records.pm +++ b/lib/cyberman/Records.pm @@ -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; }