mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 19:31:53 +02:00
share token could still contain "+", which Vfs::encodePathComponent was not encoding
fixes some files not opening in Collabora
This commit is contained in:
parent
3f06a89db5
commit
c886d567f9
@ -160,7 +160,7 @@ class Sharing
|
|||||||
self::$db = $GLOBALS['egw']->db;
|
self::$db = $GLOBALS['egw']->db;
|
||||||
|
|
||||||
$token = static::get_token();
|
$token = static::get_token();
|
||||||
|
|
||||||
// are we called from header include, because session did not verify
|
// are we called from header include, because session did not verify
|
||||||
// --> check if it verifys for our token
|
// --> check if it verifys for our token
|
||||||
if ($token && !$keep_session)
|
if ($token && !$keep_session)
|
||||||
@ -371,7 +371,7 @@ class Sharing
|
|||||||
base64_encode(openssl_random_pseudo_bytes(3*self::TOKEN_LENGTH/4)) :
|
base64_encode(openssl_random_pseudo_bytes(3*self::TOKEN_LENGTH/4)) :
|
||||||
Api\Auth::randomstring(self::TOKEN_LENGTH);
|
Api\Auth::randomstring(self::TOKEN_LENGTH);
|
||||||
// base64 can contain chars not allowed in our vfs-urls eg. / or #
|
// base64 can contain chars not allowed in our vfs-urls eg. / or #
|
||||||
} while ($token != Vfs::encodePathComponent($token));
|
} while ($token != urlencode($token));
|
||||||
|
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user