aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-30 15:52:07 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-03-30 15:52:07 +0100
commit2692c6eecad550b291b7089b6eb363d33cf23184 (patch)
tree0b6458b3e214327c10d3dce715a2c9a98e6b1b67
parentd1f3532c5aa960fd9a2a64946c78b55a30f200d5 (diff)
Also don't output cookie for JPEG files to prevent session loss.
-rw-r--r--perllib/Catalyst/Plugin/Session/State/Cookie.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Catalyst/Plugin/Session/State/Cookie.pm b/perllib/Catalyst/Plugin/Session/State/Cookie.pm
index ead8be38d..c56206774 100644
--- a/perllib/Catalyst/Plugin/Session/State/Cookie.pm
+++ b/perllib/Catalyst/Plugin/Session/State/Cookie.pm
@@ -50,8 +50,9 @@ sub update_session_cookie {
sub cookie_is_rejecting {
my ( $c, $cookie ) = @_;
- # Don't output cookie for JS files. mySociety addition
- return 1 if substr($c->request->path, -3) eq '.js';
+ # 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};