From c886d567f9d547e46ffaa13c86851633262127a3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 30 Aug 2017 18:09:54 +0200 Subject: [PATCH] share token could still contain "+", which Vfs::encodePathComponent was not encoding fixes some files not opening in Collabora --- api/src/Vfs/Sharing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Vfs/Sharing.php b/api/src/Vfs/Sharing.php index 17ec452cf2..d9f4b71ed8 100644 --- a/api/src/Vfs/Sharing.php +++ b/api/src/Vfs/Sharing.php @@ -160,7 +160,7 @@ class Sharing self::$db = $GLOBALS['egw']->db; $token = static::get_token(); - + // are we called from header include, because session did not verify // --> check if it verifys for our token if ($token && !$keep_session) @@ -371,7 +371,7 @@ class Sharing base64_encode(openssl_random_pseudo_bytes(3*self::TOKEN_LENGTH/4)) : Api\Auth::randomstring(self::TOKEN_LENGTH); // base64 can contain chars not allowed in our vfs-urls eg. / or # - } while ($token != Vfs::encodePathComponent($token)); + } while ($token != urlencode($token)); return $token; }