projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acac898
)
CRM_Core_Page_File - Only delivers directly under the customFileUploadDir
author
Tim Otten
<totten@civicrm.org>
Fri, 22 Feb 2019 08:24:49 +0000
(
00:24
-0800)
committer
Tim Otten
<totten@civicrm.org>
Fri, 22 Feb 2019 08:24:49 +0000
(
00:24
-0800)
CRM/Core/Page/File.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Page/File.php
b/CRM/Core/Page/File.php
index b13dd9d66a264c10ce13364ed6b885e2e759f689..04c5a28d7414092471e2acb38d77124fe8740d87 100644
(file)
--- a/
CRM/Core/Page/File.php
+++ b/
CRM/Core/Page/File.php
@@
-59,6
+59,9
@@
class CRM_Core_Page_File extends CRM_Core_Page {
list($path, $mimeType) = CRM_Core_BAO_File::path($fileId, $entityId);
}
else {
+ if ($fileName !== basename($fileName)) {
+ throw new CRM_Core_Exception("Malformed filename");
+ }
$mimeType = '';
$path = CRM_Core_Config::singleton()->customFileUploadDir . $fileName;
}