Qual: Use dol_include_once() to load the registry's headfile
require_once DOL_DOCUMENT_ROOT.'/'.$pagedef['headfile'] bypassed Dolibarr's standard mechanism for a core file loading a module file (dol_include_once(), via dol_buildpath()): no custom/ alternate-root resolution, no '..' path-traversal guard, no graceful failure/logging if the path were ever wrong. headfile values are plain relative paths (e.g. 'core/lib/company.lib.php') so no registry changes needed.
This commit is contained in:
parent
6ba794c353
commit
6cdd8e27b8
1 changed files with 1 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ $linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore
|
|||
|
||||
print load_fiche_titre($title, $linkback, 'title_setup');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/'.$pagedef['headfile'];
|
||||
dol_include_once($pagedef['headfile']);
|
||||
$head = call_user_func($pagedef['headfunction']);
|
||||
|
||||
print dol_get_fiche_head($head, $pagedef['tabid'], $headlabel, -1, $pagedef['headpicto']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue