[Jifty-commit] r7660 - jifty/trunk/lib/Jifty/Web
Jifty commits
jifty-commit at lists.jifty.org
Thu Nov 19 17:07:08 EST 2009
Author: sartak
Date: Thu Nov 19 17:07:08 2009
New Revision: 7660
Modified:
jifty/trunk/lib/Jifty/Web/FileUpload.pm
Log:
Strip all but the basename of upload filenames
Modified: jifty/trunk/lib/Jifty/Web/FileUpload.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/FileUpload.pm (original)
+++ jifty/trunk/lib/Jifty/Web/FileUpload.pm Thu Nov 19 17:07:08 2009
@@ -71,6 +71,9 @@
if (!defined($args{filename})) {
$args{filename} = "$fh";
+
+ # Strip all but the basename for consistency between browsers
+ $args{filename} =~ s#^.*[\\/]##;
}
if (!defined($args{content_type})) {
More information about the Jifty-commit
mailing list