Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9310
Modified Files:
UpLoad.php
Log Message:
Be more stricter with uploads: Filenames may only contain alphanumeric
characters. Patch #1037825
Index: UpLoad.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/UpLoad.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -2 -b -p -d -r1.15 -r1.16
--- UpLoad.php 22 Sep 2004 13:46:26 -0000 1.15
+++ UpLoad.php 21 Oct 2004 19:03:37 -0000 1.16
@@ -145,4 +145,10 @@ ws[cfh]");
join(", ", $this->disallowed_extensions)),HTML::br(),HTML::br());
}
+ elseif (preg_match("/[^._a-zA-Z0-9-]/", $userfile_name))
+ {
+ $message->pushContent(fmt("ERROR uploading '%s': ",$userfile_name));
+ $message->pushContent(_("File names may only contain alphanumeric characters and dot, underscore or dash."),
+ HTML::br(),HTML::br());
+ }
elseif (file_exists($file_dir . $userfile_name)) {
$message->pushContent(fmt("ERROR uploading '%s': ",$userfile_name));
@@ -229,4 +235,8 @@ ws[cfh]");
// $Log$
+// Revision 1.16 2004/10/21 19:03:37 rurban
+// Be more stricter with uploads: Filenames may only contain alphanumeric
+// characters. Patch #1037825
+//
// Revision 1.15 2004/09/22 13:46:26 rurban
// centralize upload paths.
|