aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-09-04 16:20:20 +0200
committerkondou <kondou@ts.unde.re>2014-09-04 16:20:20 +0200
commit226b203e206b534aa3d547ed0c81eb8f9c344cbc (patch)
tree03d1879c6eb66710bb87d9abd414c102a713a170 /lib
parentc2d8eabd7178a032789659abe127e557db32f550 (diff)
downloadnextcloud-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.php9
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,