summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-05-16 11:20:46 +0200
committerGitHub <noreply@github.com>2022-05-16 11:20:46 +0200
commitfd576b568cdfba3f64a35b5bc57a16141f234899 (patch)
tree69038065b025dab436895430c541fe412177c6dc /lib
parent6084d691b02764f32641aa41ebeacea5a0147b75 (diff)
parent7b3e2217de10c5b9b5b24edf1ae89ea95407ba4b (diff)
downloadnextcloud-server-fd576b568cdfba3f64a35b5bc57a16141f234899.tar.gz
nextcloud-server-fd576b568cdfba3f64a35b5bc57a16141f234899.zip
Merge pull request #32305 from nextcloud/bugfix/32302/fix-browser-agent-trimming
Fix user agent trimming on installation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php2
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);