Qual: Move security functions into security2.lib.php
This commit is contained in:
parent
89b51eeeb2
commit
ca727ca18e
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php');
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -62,5 +63,5 @@ print '</table>';
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close('');
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -21,19 +21,6 @@
|
|||||||
* \brief Library for file managing functions
|
* \brief Library for file managing functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Return user/group account of web server
|
|
||||||
*
|
|
||||||
* @param string $mode 'user' or 'group'
|
|
||||||
* @return string Return user or group of web server
|
|
||||||
*/
|
|
||||||
function dol_getwebuser($mode)
|
|
||||||
{
|
|
||||||
$t='?';
|
|
||||||
if ($mode=='user') $t=getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty
|
|
||||||
if ($mode=='group') $t=getenv('APACHE_RUN_GROUP');
|
|
||||||
return $t;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan a directory and return a list of files/directories.
|
* Scan a directory and return a list of files/directories.
|
||||||
|
|||||||
@ -26,6 +26,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return user/group account of web server
|
||||||
|
*
|
||||||
|
* @param string $mode 'user' or 'group'
|
||||||
|
* @return string Return user or group of web server
|
||||||
|
*/
|
||||||
|
function dol_getwebuser($mode)
|
||||||
|
{
|
||||||
|
$t='?';
|
||||||
|
if ($mode=='user') $t=getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty
|
||||||
|
if ($mode=='group') $t=getenv('APACHE_RUN_GROUP');
|
||||||
|
return $t;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a login if login/pass was successfull
|
* Return a login if login/pass was successfull
|
||||||
*
|
*
|
||||||
|
|||||||
@ -102,6 +102,7 @@ ErrorLoginDoesNotExists=User with login <b>%s</b> could not be found.
|
|||||||
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
|
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
|
||||||
ErrorBadValueForCode=Bad value for security code. Try again with new value...
|
ErrorBadValueForCode=Bad value for security code. Try again with new value...
|
||||||
ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative
|
ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative
|
||||||
|
ErrorWebServerUserHasNotPermission=User account <b>%s</b> used to execute web server has no permission for that
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningSafeModeOnCheckExecDir=Warning, PHP option <b>safe_mode</b> is on so command must be stored inside a directory declared by php parameter <b>safe_mode_exec_dir</b>.
|
WarningSafeModeOnCheckExecDir=Warning, PHP option <b>safe_mode</b> is on so command must be stored inside a directory declared by php parameter <b>safe_mode_exec_dir</b>.
|
||||||
|
|||||||
@ -103,6 +103,7 @@ ErrorLoginDoesNotExists=Le compte utilisateur de login <b>%s</b> n'a pu être tr
|
|||||||
ErrorLoginHasNoEmail=Cet utilisateur n'a pas d'email. Impossible de continuer.
|
ErrorLoginHasNoEmail=Cet utilisateur n'a pas d'email. Impossible de continuer.
|
||||||
ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayez avec une nouvelle valeur...
|
ErrorBadValueForCode=Mauvaise valeur saisie pour le code. Réessayez avec une nouvelle valeur...
|
||||||
ErrorBothFieldCantBeNegative=Les champs %s et %s ne peuvent être tous deux négatifs
|
ErrorBothFieldCantBeNegative=Les champs %s et %s ne peuvent être tous deux négatifs
|
||||||
|
ErrorWebServerUserHasNotPermission=Le compte d'execution du serveur web <b>%s</b> n'a pas les permissions pour cela
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningSafeModeOnCheckExecDir=Attention, l'option PHP <b>safe_mode</b> est active, la commande doit dont être dans un répertoire déclaré dans le paramètre php <b>safe_mode_exec_dir</b>.
|
WarningSafeModeOnCheckExecDir=Attention, l'option PHP <b>safe_mode</b> est active, la commande doit dont être dans un répertoire déclaré dans le paramètre php <b>safe_mode_exec_dir</b>.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user