This will help when troubleshooting issues. For web request we have
method and url, but for cron and occ currently we have no way to know if
it’s one or the other and which command.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
When `show_federated_shares_to_trusted_servers_as_internal` is enabled,
lookup server results were being filtered out because they lacked the
`isTrustedServer` flag. This adds the flag to lookup results by:
- Injecting TrustedServers service into LookupPlugin
- Adding `server` and `isTrustedServer` fields to each lookup result
- Updating tests to reflect new structure
This ensures lookup results from trusted servers appear in internal
sharing while non-trusted servers are correctly filtered out.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Add retriesMaxAttempts parameter to S3 objectstore configuration
to allow customization of AWS SDK retry behavior for handling
unreliable network conditions or proxy issues.
Defaults to 5 retries (AWS SDK default) if not specified.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
When computing the unencrypted file size, we need the size of the last encrypted chunk as its size is usually not the regular 8192 bits.
To avoid reading the whole file, we seek directly to that last chunk based on the expected file size. When the expected file size is smaller than the actual one, we have a logic in place to continue reading until we reach the end of the file.
In that logic, we forgot to increment the `$lastChunkNr` which is important when we later check the signature of the chunk.
This commit adds that missing increment.
Signed-off-by: Louis Chmn <louis@chmn.me>
The MailPlugin collaborator returned results for both user and mail
collaborators, but it was registered only for mail collaborators. While
it might make sense to move the user results to the UserPlugin instead
that change would be more complex and riskier, so for now the MailPlugin
is now registered for both user and mail collaborators and the results
are limited only to the registered type.
As the plugins are registered only with their class and then resolved
when needed using dependency injection it is not possible (as far as I
know) to provide an explicit parameter in the constructor to
differentiate whether the MailPlugin should return user or mail
collaborators. To overcome this two subclasses are introduced,
MailByMailPlugin and UserByMailPlugin, which just hardcode in their
constructor the collaborator type that their parent MailPlugin must use,
and those subclasses are the ones registered instead of the MailPlugin
(which still contains all the logic).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The federation app is not always installed, causing errors when
TrustedServers is injected as a hard dependency. This change makes
the dependency optional by using nullable types and null-safe
operators, defaulting to false when unavailable.
Modified backport of #55893 which are required for
the stable31 backport to function correctly.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
When `show_federated_shares_to_trusted_servers_as_internal` is enabled
but `show_federated_shares_as_internal` is not, filter federated share
suggestions to only include trusted servers. Previously, searching for
an email address would suggest non-trusted federated servers.
Resolved: #54511
Signed-off-by: nfebe <fenn25.fn@gmail.com>