diff --git a/lib/public/Util.php b/lib/public/Util.php index 0610460fc22..0ecfc95075b 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -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(); } /**