X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FWiki.pm;h=1c3ea8714e3f48fa1b23da4320447318210bdfe9;hb=1589baf3e90bbc7f1305e9691185188e15f326b9;hp=1792fa1df22325adf5117211c9ef1da0644c1ef9;hpb=07cc5bb211b600980b44cb28ec892a6cdd109437;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Wiki.pm b/lib/NDWeb/Controller/Wiki.pm index 1792fa1..1c3ea87 100644 --- a/lib/NDWeb/Controller/Wiki.pm +++ b/lib/NDWeb/Controller/Wiki.pm @@ -102,6 +102,9 @@ sub postedit : Local { my $wpid = $c->req->param('wpid'); if ( $wpid eq 'new'){ + 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 FROM wiki_namespace_access WHERE namespace = $1 AND post AND gid IN (SELECT groups($2))