diff options
author | kondou <kondou@ts.unde.re> | 2014-09-04 16:20:20 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2014-09-04 16:20:20 +0200 |
commit | 226b203e206b534aa3d547ed0c81eb8f9c344cbc (patch) | |
tree | 03d1879c6eb66710bb87d9abd414c102a713a170 /lib | |
parent | c2d8eabd7178a032789659abe127e557db32f550 (diff) | |
download | nextcloud-server-226b203e206b534aa3d547ed0c81eb8f9c344cbc.tar.gz nextcloud-server-226b203e206b534aa3d547ed0c81eb8f9c344cbc.zip |
Use base62 and remove configuration options for link length
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 658eaeb3a41..fe62f4f005e 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -640,14 +640,9 @@ class Share extends \OC\Share\Constants { if (isset($oldToken)) { $token = $oldToken; } else { - $tokenLength = \OC_Config::getValue("sharing_token_length", 13); - - // Enforce a limit on token length - if ($tokenLength < 3 || $tokenLength > 64) { - $tokenLength = 13; - } $token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($tokenLength, - \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS + \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_UPPER. + \OCP\Security\ISecureRandom::CHAR_DIGITS ); } $result = self::put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, |