Skip to content

Commit

Permalink
fix(share): adjust min token length and correct variation calculations
Browse files Browse the repository at this point in the history
Updated the minimum token length to reflect the smaller character set (52 characters, not the assumed 62) in use.

Signed-off-by: ernolf <[email protected]>
  • Loading branch information
ernolf committed Aug 17, 2024
1 parent b6797c3 commit 8b17435
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/private/Share/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class Constants {

public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls

public const MIN_TOKEN_LENGTH = 4; // 14,776,336 different possible variations
public const DEFAULT_TOKEN_LENGTH = 15; // 768,909,704,948,766,668,552,634,368 different possible variations
public const MAX_TOKEN_LENGTH = 32; // 2,272,657,884,496,751,345,355,241,563,627,544,170,162,852,933,518,655,225,856 different possible variations
public const MIN_TOKEN_LENGTH = 6; // 19,770,609,664 different possible variations
public const DEFAULT_TOKEN_LENGTH = 15; // 54,960,434,128,018,667,122,720,768 different possible variations
public const MAX_TOKEN_LENGTH = 32; // 8,167,835,760,036,914,488,254,418,108,462,708,901,695,678,621,570,564,096 different possible variations
public const TOKEN_LENGTH = self::DEFAULT_TOKEN_LENGTH; // old (oc7) length is 32, keep token length in db at least that for compatibility

protected static $shareTypeUserAndGroups = -1;
Expand Down

0 comments on commit 8b17435

Please sign in to comment.