summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-12-07 19:11:54 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-12-07 19:11:54 +0100
commit7df478477011d2c339c2f01b08c226a1aca64007 (patch)
tree5680a531f745cb2f8e6c857df31980f72cf58037 /framework
parentf6a3eb2bf3a165fd76ed43177150d09731918449 (diff)
Fix #558
Diffstat (limited to 'framework')
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveFileUpload.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
index b478e119..7f11115a 100755
--- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php
+++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
@@ -102,12 +102,9 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback
$localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),''));
parent::saveAs($localName);
- $filename=addslashes($this->getFileName());
-
-
$params = new TActiveFileUploadCallbackParams;
$params->localName = $localName;
- $params->fileName = $filename;
+ $params->fileName = addslashes($this->getFileName());
$params->fileSize = $this->getFileSize();
$params->fileType = $this->getFileType();
$params->errorCode = $this->getErrorCode();
@@ -198,7 +195,7 @@ EOS;
$params = $this->popParamsByToken($cp->callbackToken);
- $_FILES[$key]['name'] = $params->fileName;
+ $_FILES[$key]['name'] = stripslashes($params->fileName);
$_FILES[$key]['size'] = intval($params->fileSize);
$_FILES[$key]['type'] = $params->fileType;
$_FILES[$key]['error'] = intval($params->errorCode);