Not used anywhere so removing it $document_root_parent

This commit is contained in:
FusionPBX 2020-05-26 19:59:58 -06:00 committed by GitHub
parent 65806db347
commit e21c6f165d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 19 deletions

View File

@ -24,26 +24,23 @@
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
*/ */
//session handling //session handling
//start the session //start the session
if (function_exists('session_start')) { if (function_exists('session_start')) {
if (!isset($_SESSION)) { if (!isset($_SESSION)) {
session_start(); session_start();
}
} }
//regenerate sessions to avoid session id attacks such as session fixation }
if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") { //regenerate sessions to avoid session id attacks such as session fixation
$_SESSION['session']['last_activity'] = time(); if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") {
if (!isset($_SESSION['session']['created'])) { $_SESSION['session']['last_activity'] = time();
$_SESSION['session']['created'] = time(); if (!isset($_SESSION['session']['created'])) {
} else if (time() - $_SESSION['session']['created'] > 28800) { $_SESSION['session']['created'] = time();
// session started more than 8 hours ago } else if (time() - $_SESSION['session']['created'] > 28800) {
session_regenerate_id(true); // rotate the session id // session started more than 8 hours ago
$_SESSION['session']['created'] = time(); // update creation time session_regenerate_id(true); // rotate the session id
} $_SESSION['session']['created'] = time(); // update creation time
} }
}
//get the document_root parent directory
$document_root_parent = join(array_slice(explode("\\",realpath($_SERVER["DOCUMENT_ROOT"])),0,-1), '/');
?> ?>