Skip to content

Commit

Permalink
Item13601: fixing page cache pollution
Browse files Browse the repository at this point in the history
... by illegal path components
  • Loading branch information
MichaelDaum committed Aug 3, 2015
1 parent 918f8c7 commit 774bdbe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/lib/Foswiki/PageCache.pm
Expand Up @@ -391,6 +391,9 @@ sub isCacheable {

my $session = $Foswiki::Plugins::SESSION;

# check for errors parsing the url path
$isCacheable = 0 if $session->{invalidWeb} || $session->{invalidTopic};

# POSTs and HEADs aren't cacheable
my $method = $session->{request}->method;
$isCacheable = 0 if $method && $method =~ m/^(?:POST|HEAD)$/;
Expand Down

0 comments on commit 774bdbe

Please sign in to comment.