]> ruin.nu Git - ndwebbie.git/commitdiff
Bugfix, really check that the page name is correct
authorMichael Andreen <harv@ruin.nu>
Wed, 13 Aug 2008 11:05:35 +0000 (13:05 +0200)
committerMichael Andreen <harv@ruin.nu>
Wed, 13 Aug 2008 11:05:35 +0000 (13:05 +0200)
lib/NDWeb/Controller/Wiki.pm

index 2bf03aa16eda20f4ca576e035a5f66d7487af5a7..1c3ea8714e3f48fa1b23da4320447318210bdfe9 100644 (file)
@@ -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