[wp-cvs] wordpress/wp-admin upload.php,1.20,1.21
Mike Little
mikelittle at users.sourceforge.net
Thu Nov 18 23:30:54 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15291
Modified Files:
upload.php
Log Message:
cleanup filenames
Index: upload.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upload.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** upload.php 21 Oct 2004 15:16:03 -0000 1.20
--- upload.php 18 Nov 2004 23:30:51 -0000 1.21
***************
*** 90,95 ****
$imgdesc = htmlentities2($imgdesc);
! $imgtype = explode(".",$img1_name);
! $imgtype = strtolower($imgtype[count($imgtype)-1]);
if (in_array($imgtype, $allowed_types) == false) {
--- 90,95 ----
$imgdesc = htmlentities2($imgdesc);
! $pi = pathinfo($img1_name);
! $imgtype = strtolower($pi['extension']);
if (in_array($imgtype, $allowed_types) == false) {
More information about the cvs
mailing list