Fix can use a non template ODT file as template to read it - reported by
tremor hunter
This commit is contained in:
parent
736b11913d
commit
0620be0601
2 changed files with 5 additions and 2 deletions
|
|
@ -6151,7 +6151,10 @@ abstract class CommonObject
|
|||
$modele = $tmp[0];
|
||||
$srctemplatepath = $tmp[1];
|
||||
|
||||
var_dump($modelspath, $srctemplatepath);exit;
|
||||
if (!preg_match('/^'.preg_quote(DOL_DATA_ROOT, '/').'\/(ecm|doctemplates)/', $srctemplatepath)) {
|
||||
$this->error = 'BadDirForTemplateFile';
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Search template files
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ ExamplesWithCurrentSetup=Examples with current configuration
|
|||
ListOfDirectories=List of OpenDocument templates directories
|
||||
ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between eah directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b> or <b>.ods</b>.
|
||||
NumberOfModelFilesFound=Number of ODT/ODS template files found
|
||||
ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir
|
||||
ExampleOfDirectoriesForModelGen=Examples of syntax:<br>DOL_DATA_ROOT/doctemplates/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir
|
||||
FollowingSubstitutionKeysCanBeUsed=<br>To know how to create your odt document templates, before storing them in those directories, read wiki documentation:
|
||||
FullListOnOnlineDocumentation=https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template
|
||||
FirstnameNamePosition=Position of Name/Lastname
|
||||
|
|
|
|||
Loading…
Reference in a new issue