Skip to content
Snippets Groups Projects
Commit 9c47ab91 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #14194 from owncloud/url-encode-logout-attribute

URLEncode logout attribute
parents c6705ab5 02511082
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,7 @@ class SecureRandom implements ISecureRandom {
* Generate a random string of specified length.
* @param string $length The length of the generated string
* @param string $characters An optional list of characters to use if no characterlist is
* specified 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./
* is used.
* specified all valid base64 characters are used.
* @return string
* @throws \Exception If the generator is not initialized.
*/
......
......@@ -366,7 +366,7 @@ class OC_User {
return $backend->getLogoutAttribute();
}
return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . OC_Util::callRegister() . '"';
return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(OC_Util::callRegister()) . '"';
}
/**
......
......@@ -53,9 +53,10 @@ interface ISecureRandom {
/**
* Generate a random string of specified length.
* @param string $length The length of the generated string
* @param string $characters An optional list of characters to use
* @param string $characters An optional list of characters to use if no characterlist is
* specified all valid base64 characters are used.
* @return string
* @throws \Exception
* @throws \Exception If the generator is not initialized.
*/
public function generate($length, $characters = '');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment