From a67b5963638a70309738fab3972408fb6729a52b Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Wed, 13 Aug 2008 13:05:35 +0200 Subject: [PATCH] Bugfix, really check that the page name is correct --- lib/NDWeb/Controller/Wiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NDWeb/Controller/Wiki.pm b/lib/NDWeb/Controller/Wiki.pm index 2bf03aa..1c3ea87 100644 --- a/lib/NDWeb/Controller/Wiki.pm +++ b/lib/NDWeb/Controller/Wiki.pm @@ -102,7 +102,7 @@ sub postedit : Local { my $wpid = $c->req->param('wpid'); if ( $wpid eq 'new'){ - unless ($c->req->param('name') =~ /([A-Z]\w*)/){ + unless ($c->req->param('name') =~ /^([A-Z]\w*)$/){ die 'The name is not valid, start with a capital letter and only use alphanumerical characters or _ for the rest'; } my $namespace = $dbh->selectrow_array(q{SELECT namespace -- 2.39.2