Skip to content

Commit

Permalink
Item12367: preserve name encoding symmetry in uploads in cached requests
Browse files Browse the repository at this point in the history
Since the filename for a cached upload is based on the URL-encoded version of
the original filename, we need to use the URL-encoded version when applying
the cached upload, too.

Original Author: JanKrueger <JanKrueger@0b4bb1d4-4e5a-0410-9cc4-b2b747904278>

git-svn-id: http://svn.foswiki.org/branches/Release01x01@16464 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jan 25, 2013
1 parent 8c8cb86 commit 4b2a57a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/lib/Foswiki/Request/Cache.pm
Expand Up @@ -155,10 +155,10 @@ sub load {
# Load uploads # Load uploads
while ( my $key = <$F> ) { while ( my $key = <$F> ) {
chomp($key); chomp($key);
$key = $key = Foswiki::Sandbox::untaintUnchecked($key);
Foswiki::urlDecode( Foswiki::Sandbox::untaintUnchecked($key) ); my $decodedKey = Foswiki::urlDecode($key);
print STDERR "CACHE $uid< upload $key\n" if (TRACE_CACHE); print STDERR "CACHE $uid< upload $decodedKey\n" if (TRACE_CACHE);
$req->{uploads}->{$key} = $req->{uploads}->{$decodedKey} =
$this->_loadUpload( $this->_cacheFile($uid), $key ); $this->_loadUpload( $this->_cacheFile($uid), $key );
} }


Expand Down

0 comments on commit 4b2a57a

Please sign in to comment.