mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
add csrf meta tag (for use with xhr, for example)
This commit is contained in:
@@ -67,6 +67,15 @@ function CSRFToken()
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Retuns a CSRF meta tag (for use with xhr, for example)
|
||||
*/
|
||||
function CSRFMetaTag()
|
||||
{
|
||||
$token = htmlspecialchars($_SESSION['csrf_token']);
|
||||
return '<meta name="csrf_token" content="' . $token . '">';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Validate CSRF Token
|
||||
|
Reference in New Issue
Block a user