mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Protect against csrf in more places (accounts & guilds pages)
This commit is contained in:
@@ -25,8 +25,9 @@ class CsrfToken
|
||||
*
|
||||
* @access public
|
||||
* @static true
|
||||
* @param bool $return
|
||||
* @return string
|
||||
**/
|
||||
*/
|
||||
public static function create(bool $return = false): string {
|
||||
$input = '<input type="hidden" name="csrf_token" value="' . self::get() . '" />';
|
||||
if ($return) {
|
||||
@@ -58,7 +59,7 @@ class CsrfToken
|
||||
* @static true
|
||||
* @return boolean
|
||||
**/
|
||||
public static function isValid($post): bool
|
||||
public static function isValid(string|null $post): bool
|
||||
{
|
||||
if (!setting('core.csrf_protection')) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user