Skip to content

Commit

Permalink
Uploading docx files is no longer authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
lnprieto committed Jun 26, 2018
1 parent 7d2846d commit 6604180
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lodel/src/lodel/edition/oochargement.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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 <em>'.$sourceoriginale.'</em>, authorized are .doc, .docx, .sxw, .odt, .rtf', true, $isFrame);
printErrors('Invalid file type for document <em>'.$sourceoriginale.'</em>, authorized are .doc, .sxw, .odt, .rtf', true, $isFrame);
}
elseif(!empty($context['multiple']))
{
Expand Down

1 comment on commit 6604180

@bcenou
Copy link
Contributor

@bcenou bcenou commented on 6604180 Jun 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ne pas avoir déplacé la liste des extensions autorisées dans lodelconfig ?
OTX devra accepter les docx dans un futur proche.

Please sign in to comment.