Skip to content

Commit

Permalink
fix(filefield): file upload mai fail
Browse files Browse the repository at this point in the history
this occurs when the filename contains a single quote

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jun 12, 2019
1 parent 8446e47 commit c69a5d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inc/fields/filefield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public function parseAnswerValues($input, $nonDestructive = false) {
$index = count($input["_$key"]);
} else {
foreach ($input["_$key"] as $document) {
$document = Toolbox::stripslashes_deep($document);
if (is_file(GLPI_TMP_DIR . '/' . $document)) {
$prefix = $input['_prefix_formcreator_field_' . $this->fields['id']][$index];
$answer_value[] = $this->saveDocument($document, $prefix);
Expand Down

0 comments on commit c69a5d0

Please sign in to comment.