diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-04-06 15:28:47 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-04-06 17:36:26 +0100 |
commit | f598f56fab4492821eaf8e7507d7b3a99e4a9e2a (patch) | |
tree | 91995ebb70ce7538ee035c6d581e80264c803107 /perllib/Catalyst | |
parent | dc5e30296d78b3171188acaef8bca1ae4e7b4596 (diff) |
Prevent dev sites auto-creating session.
We check for a session's existence before looking in it, as looking in
it first would auto create a session.
Diffstat (limited to 'perllib/Catalyst')
-rw-r--r-- | perllib/Catalyst/Plugin/Session/State/Cookie.pm | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/perllib/Catalyst/Plugin/Session/State/Cookie.pm b/perllib/Catalyst/Plugin/Session/State/Cookie.pm index bef0c1e66..c4b61123b 100644 --- a/perllib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/perllib/Catalyst/Plugin/Session/State/Cookie.pm @@ -50,13 +50,6 @@ 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'; - if ( $cookie->{path} ) { return 1 if index '/'.$c->request->path, $cookie->{path}; } |