From a1fe3c9c4555d3b89543c700582386e9f3d2bb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de> Date: Tue, 30 Jan 2018 13:29:14 +0100 Subject: [PATCH] feat: make auth salt static in test environments There are circumstances where we may want to test generated content that uses the auth salt, for example when one tests the rendering of external images where the url contains a token from media_get_token --- inc/auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/auth.php b/inc/auth.php index 7fa61aa18..5f61a8e70 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -308,6 +308,9 @@ function auth_browseruid() { * @return string */ function auth_cookiesalt($addsession = false, $secure = false) { + if (defined('SIMPLE_TEST')) { + return ''; + } global $conf; $file = $conf['metadir'].'/_htcookiesalt'; if ($secure || !file_exists($file)) { -- GitLab