Use zm_session_start instead of session_start

This commit is contained in:
Isaac Connor 2019-08-16 15:07:20 -04:00
parent 660eddc69d
commit cfeedd39a4
1 changed files with 1 additions and 2 deletions

View File

@ -92,14 +92,13 @@ class AppController extends Controller {
$stateful = $this->request->query('stateful') ? $this->request->query('stateful') : $this->request->data('stateful'); $stateful = $this->request->query('stateful') ? $this->request->query('stateful') : $this->request->data('stateful');
if ( $stateful ) { if ( $stateful ) {
session_start(); zm_session_start();
$_SESSION['remoteAddr'] = $_SERVER['REMOTE_ADDR']; // To help prevent session hijacking $_SESSION['remoteAddr'] = $_SERVER['REMOTE_ADDR']; // To help prevent session hijacking
$_SESSION['username'] = $user['Username']; $_SESSION['username'] = $user['Username'];
if ( ZM_AUTH_RELAY == 'plain' ) { if ( ZM_AUTH_RELAY == 'plain' ) {
// Need to save this in session, can't use the value in User because it is hashed // Need to save this in session, can't use the value in User because it is hashed
$_SESSION['password'] = $_REQUEST['password']; $_SESSION['password'] = $_REQUEST['password'];
} }
zm_session_regenerate_id();
session_write_close(); session_write_close();
} }
} }