mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Add CSRF token to password change page
This commit is contained in:
@@ -1,5 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Add CSRF Token to form
|
||||
*
|
||||
*/
|
||||
function CSRFToken() {
|
||||
?>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $csrf_token; ?>" />
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Validate CSRF Token
|
||||
*
|
||||
*/
|
||||
function CSRFValidate() {
|
||||
return hash_equals($_POST['csrf_token'], $_SESSION['csrf_token']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $input
|
||||
|
Reference in New Issue
Block a user