488,19 → 488,19 |
return $res; |
} |
|
function getCRSFToken($id) { |
function getCSRFToken($id) { |
$token = $this->rndString(); |
$this->query("UPDATE USERS Set CSRFToken = ? WHERE ID = ?", array($token, $id)); |
return $token; |
} |
|
function checkCRSFToken($id, $token) { |
function checkCSRFToken($id, $token) { |
$user = $this->getUserByID($id); |
if ($token !== $user->csrftoken) { |
die("a death"); |
} |
|
$this->getCRSFToken($id); // change to something else so we can't re-use it |
$this->getCSRFToken($id); // change to something else so we can't re-use it |
} |
|
function getGetID() { |