Browse Source

Change token generation function

merge-requests/1/head
Erase 4 years ago
parent
commit
f480e7f84f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      generate.php
  2. +1
    -1
      index.php

+ 1
- 1
generate.php View File

@ -7,7 +7,7 @@
//~ Check token
session_start();
if(empty($_SESSION['csrf_token'])){
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
$_SESSION['csrf_token'] = uniqid(rand(), true);
}
$headers = apache_request_headers();


+ 1
- 1
index.php View File

@ -2,7 +2,7 @@
//~ Generate token
session_start();
if(empty($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
$_SESSION['csrf_token'] = uniqid(rand(), true);
}
?>
<!DOCTYPE html>


Loading…
Cancel
Save