Permalink
Browse files

Avoid infinite recursion for missing pages

  • Loading branch information...
1 parent e8c409e commit 9090f04468c2d3547e283d383357eae4bfc2bd34 @kimrutherford kimrutherford committed Apr 4, 2013
Showing with 3 additions and 1 deletion.
  1. +1 −0 lib/PomCur.pm
  2. +2 −1 lib/PomCur/Controller/Root.pm
View
@@ -78,6 +78,7 @@ __PACKAGE__->deny_access_unless(
!$access_control_enabled || $action eq 'front';
},
);
+__PACKAGE__->allow_access('/default');
__PACKAGE__->allow_access('/end');
__PACKAGE__->allow_access('/account');
__PACKAGE__->allow_access('/login');
@@ -28,6 +28,7 @@ sub default :Path
my $st = $c->stash;
$st->{title} = "Page not found";
+ $st->{show_title} = 0;
$st->{template} = 'not_found_404.mhtml';
$c->response->status(404);
}
@@ -156,7 +157,7 @@ sub _do_local_and_docs
$c->stash()->{error} =
{ title => "No such page",
text => "$page_name doesn't exist" };
- $c->forward($c->config()->{home_path});
+ $c->forward('/default');
$c->detach();
}
}

0 comments on commit 9090f04

Please sign in to comment.