mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Readd TOKEN_LENGTH
This commit is contained in:
parent
226b203e20
commit
a10411d2bc
2 changed files with 3 additions and 1 deletions
|
|
@ -34,6 +34,8 @@ class Constants {
|
|||
const FORMAT_STATUSES = -2;
|
||||
const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
|
||||
|
||||
const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
|
||||
|
||||
protected static $shareTypeUserAndGroups = -1;
|
||||
protected static $shareTypeGroupUserUnique = 2;
|
||||
protected static $backends = array();
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ class Share extends \OC\Share\Constants {
|
|||
if (isset($oldToken)) {
|
||||
$token = $oldToken;
|
||||
} else {
|
||||
$token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($tokenLength,
|
||||
$token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(self::TOKEN_LENGTH,
|
||||
\OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_UPPER.
|
||||
\OCP\Security\ISecureRandom::CHAR_DIGITS
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue