Skip to content

Commit

Permalink
Item12640: don't screw up filenames
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/XSendFileContrib@17060 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Nov 6, 2013
1 parent 7a52638 commit a115bce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions data/System/XSendFileContrib.txt
Expand Up @@ -113,6 +113,7 @@ One line description, required for extensions repository catalog.
| Dependencies: | %$DEPENDENCIES% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 06 Nov 2013 | fixed filenames with spaces not being found |
| 01 Nov 2013 | added support for if-modified-since http headers |
| 22 May 2013 | using mime-magic as a fallback in case file extensions don't unveil the mime-type |
| 28 Mar 2013 | implemented {<nop>AccessRules} to allow any kind of access control list for attachments |
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Contrib/XSendFileContrib.pm
Expand Up @@ -24,8 +24,8 @@ use Foswiki::Func ();
use Foswiki::Time ();
use File::MMagic ();

our $VERSION = '3.00';
our $RELEASE = '3.00';
our $VERSION = '3.02';
our $RELEASE = '3.02';
our $SHORTDESCRIPTION = 'A viewfile replacement to send static files efficiently';
our $mimeTypeInfo;
our $mmagic;
Expand Down Expand Up @@ -94,7 +94,7 @@ sub xsendfile {

$fileName = Foswiki::urlDecode($fileName);
$fileName = Encode::decode_utf8($fileName);
$fileName = Foswiki::Sandbox::untaint($fileName, \&Foswiki::Sandbox::validateAttachmentName);
#$fileName = Foswiki::Sandbox::untaint($fileName, \&Foswiki::Sandbox::validateAttachmentName);

# invalid
unless (defined $fileName) {
Expand Down

0 comments on commit a115bce

Please sign in to comment.