diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-21 17:22:51 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-21 17:22:51 +0100 |
commit | 441052eb05a759bc810dfbd9b7cb19c2747e44d6 (patch) | |
tree | ae35e7c684e999adec90c2861b6be905e4e0503d /perllib/Catalyst | |
parent | 87c98049ced69902427c752666245bf652727a37 (diff) |
Prevent potential recursion in session cookie.
Unlikely to crop up, but this fixes #1077.
Diffstat (limited to 'perllib/Catalyst')
-rw-r--r-- | perllib/Catalyst/Plugin/Session/State/Cookie.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/Catalyst/Plugin/Session/State/Cookie.pm b/perllib/Catalyst/Plugin/Session/State/Cookie.pm index e0a651ed9..bef0c1e66 100644 --- a/perllib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/perllib/Catalyst/Plugin/Session/State/Cookie.pm @@ -50,6 +50,9 @@ sub update_session_cookie { sub cookie_is_rejecting { my ( $c, $cookie ) = @_; + # Prevent infinite loop in request->path. mySociety addition + return 0 if $c->request->has_uri && !$c->request->_has_path; + # Don't output cookie for JS or JPEG files. mySociety addition return 1 if substr($c->request->path, -3) eq '.js' || substr($c->request->path, -5) eq '.jpeg'; |