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

URLEncode logout attribute
This commit is contained in:
Thomas Müller 2015-02-16 15:04:20 +01:00
commit 9c47ab91f2
3 changed files with 5 additions and 5 deletions

View file

@ -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.
*/

View file

@ -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()) . '"';
}
/**

View file

@ -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 = '');
}