diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/br.js | 5 | ||||
-rw-r--r-- | lib/l10n/br.json | 5 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 6 | ||||
-rw-r--r-- | lib/private/Collaboration/Collaborators/UserPlugin.php | 19 | ||||
-rw-r--r-- | lib/private/EventDispatcher/SymfonyAdapter.php | 2 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/S3Signature.php | 3 |
6 files changed, 26 insertions, 14 deletions
diff --git a/lib/l10n/br.js b/lib/l10n/br.js index 5c069c5ca5f..8d766a49ea3 100644 --- a/lib/l10n/br.js +++ b/lib/l10n/br.js @@ -1,9 +1,14 @@ OC.L10N.register( "lib", { + "Unknown filetype" : "N'eo ket anavezet stumm an teuliad", + "Invalid image" : "N'eo ket aotreet ar skeudenn", + "seconds ago" : "eilenn zo", "__language_name__" : "Brezhoneg", "Help" : "Skoazell", + "Apps" : "Meziant", "Settings" : "Arventennoù", + "Users" : "Implijer", "Open »%s«" : "Digeriñ »%s«", "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent" }, diff --git a/lib/l10n/br.json b/lib/l10n/br.json index 4568b23f1cb..b46fd2a05f9 100644 --- a/lib/l10n/br.json +++ b/lib/l10n/br.json @@ -1,7 +1,12 @@ { "translations": { + "Unknown filetype" : "N'eo ket anavezet stumm an teuliad", + "Invalid image" : "N'eo ket aotreet ar skeudenn", + "seconds ago" : "eilenn zo", "__language_name__" : "Brezhoneg", "Help" : "Skoazell", + "Apps" : "Meziant", "Settings" : "Arventennoù", + "Users" : "Implijer", "Open »%s«" : "Digeriñ »%s«", "Storage is temporarily not available" : "N'haller ket tizhout ar skor roadennoù evit ar poent" },"pluralForm" :"nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);" diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 12748e0dd62..6428f7116b0 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -653,6 +653,12 @@ class Request implements \ArrayAccess, \Countable, IRequest { if (isset($this->server[$header])) { foreach (explode(',', $this->server[$header]) as $IP) { $IP = trim($IP); + + // remove brackets from IPv6 addresses + if (strpos($IP, '[') === 0 && substr($IP, -1) === ']') { + $IP = substr($IP, 1, -1); + } + if (filter_var($IP, FILTER_VALIDATE_IP) !== false) { return $IP; } diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 7c02e3c79ac..123fa731445 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -33,7 +33,6 @@ use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; use OCP\IConfig; -use OCP\IGroup; use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; @@ -73,20 +72,19 @@ class UserPlugin implements ISearchPlugin { $users = []; $hasMoreResults = false; - $userGroups = []; + $currentUserGroups = $this->groupManager->getUserGroupIds($this->userSession->getUser()); if ($this->shareWithGroupOnly) { // Search in all the groups this user is part of - $userGroups = $this->groupManager->getUserGroups($this->userSession->getUser()); - foreach ($userGroups as $userGroup) { - $usersInGroup = $userGroup->searchDisplayName($search, $limit, $offset); - foreach ($usersInGroup as $user) { - $users[$user->getUID()] = $user; + foreach ($currentUserGroups as $userGroupId) { + $usersInGroup = $this->groupManager->displayNamesInGroup($userGroupId, $search, $limit, $offset); + foreach ($usersInGroup as $userId => $displayName) { + $userId = (string) $userId; + $users[$userId] = $this->userManager->get($userId); } } } else { // Search in all users $usersTmp = $this->userManager->searchDisplayName($search, $limit, $offset); - $currentUserGroups = $this->groupManager->getUserGroupIds($this->userSession->getUser()); foreach ($usersTmp as $user) { if ($user->isEnabled()) { // Don't keep deactivated users $users[$user->getUID()] = $user; @@ -155,10 +153,7 @@ class UserPlugin implements ISearchPlugin { if ($this->shareWithGroupOnly) { // Only add, if we have a common group - $userGroupIds = array_map(function (IGroup $group) { - return $group->getGID(); - }, $userGroups); - $commonGroups = array_intersect($userGroupIds, $this->groupManager->getUserGroupIds($user)); + $commonGroups = array_intersect($currentUserGroups, $this->groupManager->getUserGroupIds($user)); $addUser = !empty($commonGroups); } diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php index b1a39a79131..5bba275b2ab 100644 --- a/lib/private/EventDispatcher/SymfonyAdapter.php +++ b/lib/private/EventDispatcher/SymfonyAdapter.php @@ -63,7 +63,7 @@ class SymfonyAdapter implements EventDispatcherInterface { $this->eventDispatcher->dispatch($eventName, $event); } else { // Legacy event - $this->logger->info( + $this->logger->debug( 'Deprecated event type for {name}: {class}', [ 'name' => $eventName, 'class' => is_object($event) ? get_class($event) : 'null' ] ); diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php index f9ea2e22aad..bcd1eef7b2a 100644 --- a/lib/private/Files/ObjectStore/S3Signature.php +++ b/lib/private/Files/ObjectStore/S3Signature.php @@ -73,7 +73,8 @@ class S3Signature implements SignatureInterface { public function presign( RequestInterface $request, CredentialsInterface $credentials, - $expires + $expires, + array $options = [] ) { $query = []; // URL encoding already occurs in the URI template expansion. Undo that |