From 6604180dade14bf0b63fc395d3718f3dc1dd027e Mon Sep 17 00:00:00 2001 From: prieto Date: Tue, 26 Jun 2018 09:04:03 +0200 Subject: [PATCH] Uploading docx files is no longer authorized --- lodel/src/lodel/edition/oochargement.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lodel/src/lodel/edition/oochargement.php b/lodel/src/lodel/edition/oochargement.php index beace31f0..1334ae271 100644 --- a/lodel/src/lodel/edition/oochargement.php +++ b/lodel/src/lodel/edition/oochargement.php @@ -196,7 +196,7 @@ function printErrors($errors, $exit = true, $isFrame = true) { foreach($extracted_files as $file) { - if(in_array(strtolower(pathinfo($file, PATHINFO_EXTENSION)), array('doc', 'docx', 'sxw', 'odt', 'rtf'))) + if(in_array(strtolower(pathinfo($file, PATHINFO_EXTENSION)), array('doc', 'sxw', 'odt', 'rtf'))) { $tmp = tmpdir(uniqid('import_', true)); rename($oldtmpdir . DIRECTORY_SEPARATOR . $file, $tmp . DIRECTORY_SEPARATOR . $file); @@ -281,9 +281,9 @@ function removefilesfromimport($rep) die; } - elseif(!in_array($ext, array('doc', 'docx', 'sxw', 'odt', 'rtf'))) + elseif(!in_array($ext, array('doc', 'sxw', 'odt', 'rtf'))) { - printErrors('invalid file type for document '.$sourceoriginale.', authorized are .doc, .docx, .sxw, .odt, .rtf', true, $isFrame); + printErrors('Invalid file type for document '.$sourceoriginale.', authorized are .doc, .sxw, .odt, .rtf', true, $isFrame); } elseif(!empty($context['multiple'])) {