mirror of
https://github.com/nextcloud/server.git
synced 2026-03-29 13:53:55 -04:00
fix: Remove useless static property in OCP\Util
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
5961eba6a1
commit
3fcb3a962d
1 changed files with 1 additions and 12 deletions
|
|
@ -412,24 +412,13 @@ class Util {
|
|||
return \OC_Hook::emit($signalclass, $signalname, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cached encrypted CSRF token. Some static unit-tests of ownCloud compare
|
||||
* multiple Template elements which invoke `callRegister`. If the value
|
||||
* would not be cached these unit-tests would fail.
|
||||
* @var string
|
||||
*/
|
||||
private static $token = '';
|
||||
|
||||
/**
|
||||
* Register an get/post call. This is important to prevent CSRF attacks
|
||||
* @since 4.5.0
|
||||
* @deprecated 32.0.0 directly use CsrfTokenManager instead
|
||||
*/
|
||||
public static function callRegister() {
|
||||
if (self::$token === '') {
|
||||
self::$token = \OCP\Server::get(CsrfTokenManager::class)->getToken()->getEncryptedValue();
|
||||
}
|
||||
return self::$token;
|
||||
return \OCP\Server::get(CsrfTokenManager::class)->getToken()->getEncryptedValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue