Added more protection against session theft
This commit is contained in:
parent
8db64004ca
commit
243e9b045f
3 changed files with 14 additions and 1 deletions
|
|
@ -18,7 +18,14 @@
|
|||
|
||||
session_start();
|
||||
|
||||
if(!isset($_SESSION['id'])) {
|
||||
|
||||
if(
|
||||
!isset($_SESSION['id']) ||
|
||||
!isset($_SESSION['secret']) ||
|
||||
!isset($_COOKIE['authSecret']) ||
|
||||
$_SESSION['secret'] !== $_COOKIE['authSecret']
|
||||
) {
|
||||
header('Location: index.php');
|
||||
session_destroy();
|
||||
exit();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue