Merge branch 'ticket/bantu/9615' into develop-olympus

* ticket/bantu/9615:
  [ticket/9615] magic_quotes_gpc: call stripslashes() before utf8_basename()
This commit is contained in:
Chris Smith 2010-08-30 14:55:50 +01:00
commit ebb4a50d9b

View file

@ -58,8 +58,9 @@ class filespec
$this->filename = $upload_ary['tmp_name'];
$this->filesize = $upload_ary['size'];
$name = trim(utf8_htmlspecialchars(utf8_basename($upload_ary['name'])));
$this->realname = $this->uploadname = (STRIP) ? stripslashes($name) : $name;
$name = (STRIP) ? stripslashes($upload_ary['name']) : $upload_ary['name'];
$name = trim(utf8_htmlspecialchars(utf8_basename($name)));
$this->realname = $this->uploadname = $name;
$this->mimetype = $upload_ary['type'];
// Opera adds the name to the mime type