Skip to content

Commit

Permalink
fix: cast default token length to string for compatibility with getAp…
Browse files Browse the repository at this point in the history
…pValue

Signed-off-by: ernolf <[email protected]>
  • Loading branch information
ernolf committed Aug 15, 2024
1 parent 4b10b32 commit 2cf8f85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Share/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static function isSameUserOnSameServer($user1, $server1, $user2, $server2

public static function getTokenLength(): int {
$config = \OC::$server->getConfig();
$tokenLength = (int)$config->getAppValue('core', 'shareapi_token_length', self::DEFAULT_TOKEN_LENGTH);
$tokenLength = (int)$config->getAppValue('core', 'shareapi_token_length', (string)self::DEFAULT_TOKEN_LENGTH);

// Token length should be within the defined min and max limits
if ($tokenLength < self::MIN_TOKEN_LENGTH) {
Expand Down

0 comments on commit 2cf8f85

Please sign in to comment.