Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix to an incorrect validation of temporary filenames
  • Loading branch information
iglocska committed Jul 1, 2015
1 parent b433a19 commit 27cc167
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION.json
@@ -1 +1 @@
{"major":2, "minor":3, "hotfix":91}
{"major":2, "minor":3, "hotfix":92}
2 changes: 1 addition & 1 deletion app/Controller/TemplatesController.php
Expand Up @@ -334,7 +334,7 @@ public function submitEventPopulation($template_id, $event_id) {
$this->loadModel('Attribute');
$fails = 0;
foreach($attributes as $k => &$attribute) {
if (isset($attribute['data'])) {
if (isset($attribute['data']) && preg_match('/^[a-zA-Z0-9]{12}$/', $attribute['data'])) {
$file = new File(APP . 'tmp/files/' . $attribute['data']);
$content = $file->read();
$attribute['data'] = base64_encode($content);
Expand Down

0 comments on commit 27cc167

Please sign in to comment.