and now actually with a secret key
This commit is contained in:
parent
c21d1b65ac
commit
298052d1b8
2 changed files with 6 additions and 1 deletions
|
@ -303,7 +303,7 @@ MIG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
csrf_init('soapsoapsoap', empty($userDisplayInfo) ? ip_remote_address() : $_COOKIE['msz_sid']);
|
csrf_init($app->getCsrfSecretKey(), empty($userDisplayInfo) ? ip_remote_address() : $_COOKIE['msz_sid']);
|
||||||
|
|
||||||
$privateInfo = $app->getPrivateInfo();
|
$privateInfo = $app->getPrivateInfo();
|
||||||
|
|
||||||
|
|
|
@ -354,6 +354,11 @@ final class Application
|
||||||
return $this->getPath($this->config['Avatar']['default_path'] ?? 'public/images/no-avatar.png');
|
return $this->getPath($this->config['Avatar']['default_path'] ?? 'public/images/no-avatar.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCsrfSecretKey(): string
|
||||||
|
{
|
||||||
|
return $this->config['CSRF']['secret_key'] ?? 'insecure';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the currently active instance of Application
|
* Gets the currently active instance of Application
|
||||||
* @return Application
|
* @return Application
|
||||||
|
|
Loading…
Add table
Reference in a new issue