diff --git a/db_structure.xml b/db_structure.xml
index a17ab90b8a..99a30cb613 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -395,7 +395,7 @@
text
true
- 128
+ 64
diff --git a/lib/base.php b/lib/base.php
index 0ba028a68d..c9dcac3cbb 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -566,7 +566,7 @@ class OC{
if (in_array($_COOKIE['oc_token'], $tokens, true)) {
// replace successfully used token with a new one
OC_Preferences::deleteKey($_COOKIE['oc_username'], 'login_token', $_COOKIE['oc_token']);
- $token = OC_Util::generate_random_bytes(128);
+ $token = OC_Util::generate_random_bytes(32);
OC_Preferences::setValue($_COOKIE['oc_username'], 'login_token', $token, time());
OC_User::setMagicInCookie($_COOKIE['oc_username'], $token);
// login
@@ -600,7 +600,7 @@ class OC{
if(defined("DEBUG") && DEBUG) {
OC_Log::write('core', 'Setting remember login to cookie', OC_Log::DEBUG);
}
- $token = OC_Util::generate_random_bytes(128);
+ $token = OC_Util::generate_random_bytes(32);
OC_Preferences::setValue($_POST['user'], 'login_token', $token, time());
OC_User::setMagicInCookie($_POST["user"], $token);
}
diff --git a/lib/util.php b/lib/util.php
index 707100a9bc..68c4920258 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -83,7 +83,7 @@ class OC_Util {
*/
public static function getVersion() {
// hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.90.0. This is not visible to the user
- return array(4,91,01);
+ return array(4,91,00);
}
/**