diff options
author | Joas Schilling <coding@schilljs.com> | 2022-05-09 08:36:34 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-05-09 08:36:34 +0200 |
commit | 7b3e2217de10c5b9b5b24edf1ae89ea95407ba4b (patch) | |
tree | b7fb9ffd333d403771d0f7209e1a4ec3e744076a /lib | |
parent | 4f55ba2a8895995649306911e3efa92904906836 (diff) | |
download | nextcloud-server-7b3e2217de10c5b9b5b24edf1ae89ea95407ba4b.tar.gz nextcloud-server-7b3e2217de10c5b9b5b24edf1ae89ea95407ba4b.zip |
Fix user agent trimming on installation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 26337029d77..a1d75828e27 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -85,7 +85,7 @@ class PublicKeyTokenProvider implements IProvider { int $type = IToken::TEMPORARY_TOKEN, int $remember = IToken::DO_NOT_REMEMBER): IToken { if (mb_strlen($name) > 128) { - throw new InvalidTokenException('The given name is too long'); + $name = mb_substr($name, 0, 120) . '…'; } $dbToken = $this->newToken($token, $uid, $loginName, $password, $name, $type, $remember); |