Fixes for handling of invalid p param. Don't allow directory
[catagits/Gitalist.git] / lib / Gitalist / Controller / Root.pm
index f9e94ad..064ea6d 100644 (file)
@@ -636,7 +636,7 @@ sub auto : Private {
       $c->stash(Project => $c->model('GitRepos')->project($project));
     };
     if ($@) {
-      $c->detach('error_404');
+      $c->detach('/error_404');
     }
   }
 
@@ -679,10 +679,7 @@ sub end : ActionClass('RenderView') {
 sub error_404 :Private {
     my ($self, $c) = @_;
     $c->response->status(404);
-    $c->stash(
-        title => 'Page not found',
-        content => 'Page not found',
-    );
+    $c->response->body('Page not found');
 }
 
 sub age_string {