Commit graph

27368 commits

Author SHA1 Message Date
Micke Nordin
a88fdcbed5
Merge pull request #57234 from enriquepablo/master
Implement token exchange from OCM
2026-06-18 11:33:24 +02:00
Nextcloud bot
dad4644546
fix(l10n): Update translations from Transifex
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-18 00:22:59 +00:00
Benjamin Gaussorgues
3048d95615
Merge pull request #61368 from nextcloud/chore/prevent_subadmin_edit
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
fix: prevent editing delegated admins
2026-06-17 16:02:11 +02:00
Robin Appelman
61037332f0
Merge pull request #60988 from nextcloud/search-operator-params
chore: fix SearchBinaryOperator constructor type hint
2026-06-17 13:16:24 +02:00
Micke Nordin
4d5841761f
fix(cloud_federation_api): accept multi-protocol share envelopes
Shares using the OCM multi-protocol envelope (name multi, with the secret carried in a sibling protocol entry such as webdav) were rejected with Missing sharedSecret in protocol. Scan every protocol entry for the shared secret during validation, resolve the secret from the matching entry, and let the files provider serve the webdav entry of a multi envelope. Covers the file and folder resource types.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-06-17 11:01:19 +02:00
Enrique Pérez Arnaud
3d3b49ce63
chore: regenerate autoloaders and update psalm baseline
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 11:01:18 +02:00
Enrique Pérez Arnaud
3616212ba2
feat(files_sharing): store and refresh OCM access tokens for external shares
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 11:01:16 +02:00
Enrique Pérez Arnaud
4d56c74ba7
feat(ocm): advertise exchange-token capability and token endpoint
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 11:01:14 +02:00
Enrique Pérez Arnaud
ac2f9816a6
feat(auth): support permanent OCM refresh tokens and bearer login
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 10:44:51 +02:00
Andy Scherzinger
9af6fe9500
Merge pull request #61053 from bygadd/fix/taskprocessing-worker-atomic-claim
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
fix(taskprocessing): claim tasks atomically so parallel workers don't duplicate
2026-06-17 10:21:33 +02:00
Benjamin Gaussorgues
ab29b132e5
fix: prevent editing delegated admins
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-17 10:18:54 +02:00
Andy Scherzinger
f985b90a77
Merge pull request #61332 from nextcloud/fix/string-expected-int-given
fix: ensure file names are string-typed
2026-06-17 07:25:09 +02:00
Yoan Bozhilov
80f72a86e7 fix(taskprocessing): @since 35.0.0 for claimNextScheduledTask
The new public IManager::claimNextScheduledTask lands in master (35.0.0),
not 34.0.0. Addresses review feedback.

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8
2026-06-17 07:45:49 +03:00
Nextcloud bot
188006bc95
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-17 00:22:57 +00:00
Andy Scherzinger
d6086c2325
Merge pull request #61308 from nextcloud/fix/noid/team-manager-resources
fix(team-manager): ensure team resources are only retrived for members
2026-06-16 20:33:49 +02:00
Andy Scherzinger
c409abfc63
Merge pull request #61322 from nextcloud/fix/improve-password-confirmation-middleware
fix: Do not set last-password-confirm for apptoken sessions
2026-06-16 19:49:28 +02:00
Stephan Orbaugh
03077b52f9
Merge pull request #60587 from nextcloud/fix/99281/lookup-duplicates
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Psalm static code analysis / changes (push) Waiting to run
Psalm static code analysis / static-code-analysis (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-security (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ocp (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-ncu (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-strict (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis-summary (push) Blocked by required conditions
fix: trim duplicate search results for external share
2026-06-16 16:10:49 +02:00
Micke Nordin
ebc6ef64a0
Merge pull request #61126 from nextcloud/kano-fix-ocm-discovery
fix(ocm): merge resource types by name in discovery
2026-06-16 15:43:18 +02:00
Arthur Schiwon
437952bd70
fix: ensure file names are string-typed
- `$child` was used as an array key earlier. If they are numeric, they
  are automatically converted to ints, leading to type issues later.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2026-06-16 13:13:38 +02:00
Côme Chilliet
f7f9a47ceb
fix: Do not set last-password-confirm for apptoken sessions
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-16 11:59:13 +02:00
Micke Nordin
41e9022100 fix(ocm): merge resource types by name in discovery
Current code blindy adds any resources to the ocm disocvery, this makes
it so that different cloud federation providers can not add different
protocols for the same resourceType without the resourceType being
duplicated, something that OCM does not allow:

```
REQUIRED: resourceTypes (array) - A list of all resource types this
server supports in both the Sending Server role and the Receiving
Server role, with their access protocols. Each item in this list MUST
itself be an object containing the following fields:

name (string) - A supported resource type (file, calendar, contact, ...).
Implementations MUST offer support for at least one resource type, where
file is the commonly supported one. Each resource type is identified by
its name: the list MUST NOT contain more than one resource type object
per given name.

...
```

https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh-04#name-fields

This patch changes this behaviour from this example result:
```
   {
      "name": "folder",
      "shareTypes": [
        "user"
      ],
      "protocols": {
        "webapp": {}
      }
    },
    {
      "name": "folder",
      "shareTypes": [
        "user"
      ],
      "protocols": {
        "webapp-receive": {
          "targets": [
            "blank",
            "iframe"
          ]
        }
      }
```

to:

```
{
      "name": "folder",
      "shareTypes": [
        "user"
      ],
      "protocols": {
        "webapp": {},
        "webapp-receive": {
          "targets": [
            "blank",
            "iframe"
          ]
        }
      }
```

which is the correct behaviour according to OCM.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-06-16 11:30:24 +02:00
Micke Nordin
2beb626995 feat(OCM): Add event for received notifications
OCM is standardizing and expanding the use of notifications and having
an event for acting on in apps will be very useful.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-06-16 11:30:00 +02:00
Marcel Klehr
eda0de0c14
Merge pull request #61190 from nextcloud/feat/taskprocessing-update-completionexpected
feat(TaskProcessing): Update completionExpectedAt in Manager#setTaskProgress
2026-06-16 11:19:08 +02:00
Simon L.
e9eac64f33
Merge pull request #58971 from nextcloud/enh/noid/slow-caps-debug-mode
refactor(CapabilitiesManager): log slow capabilities in a single message
2026-06-16 10:14:44 +02:00
Nextcloud bot
0f657aedbe
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-16 00:23:06 +00:00
Cristian Scheid
74849c99e3 fix(team-manager): ensure team resources are only retrived for members
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
2026-06-15 14:12:58 -03:00
Simon L.
3881d9b1fa refactor(CapabilitiesManager): log slow capabilities in a single message
Instead of logging one message per slow capability (and only in debug
mode), collect all slow capabilities and emit a single log entry with
all timings, using the highest applicable log level.

Signed-off-by: Simon L. <szaimen@e.mail.de>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-06-15 18:42:47 +02:00
Simon L.
3e6d2dc794 fix(CapabilitiesManager): only check execution time if debug mode is enabled
Signed-off-by: Simon L. <szaimen@e.mail.de>
Co-Authored-By: Anna <anna@nextcloud.com>
2026-06-15 18:37:11 +02:00
niv
26526ec134 fix: trim duplicate search results for external share
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
2026-06-15 16:57:51 +02:00
Yoan Bozhilov
df2368896f docs(taskprocessing): document lockTask semantic change
Per review feedback: note in the lockTask docblock that the guard changed from
`status != RUNNING` to `status = SCHEDULED`, and that callers must now treat a
0 return as "the task is no longer claimable" rather than assuming success.

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8
2026-06-15 16:37:34 +02:00
Yoan Bozhilov
022531b997 fix(taskprocessing): guard lockTask on scheduled, record started_at, Oracle fallback
Address review feedback (@marcelklehr, Copilot):
- lockTask claims only SCHEDULED tasks (was status != RUNNING) and stamps
  started_at in the same atomic UPDATE, so a finished task cannot be re-claimed
  and the external-provider claim path records started_at as well.
- claimWithBoundedRetry re-reads after lockTask instead of a follow-up UPDATE.
- Oracle joins SQLite on the bounded-retry fallback: Oracle cannot combine a
  row-limiting clause with FOR UPDATE (ORA-02014), which failed the claim tests
  on Oracle CI.
- Reword the worker docblock/comments to "prefer oldest available" (parallel
  SKIP LOCKED does not guarantee a strict global order).
- Add a regression test that lockTask does not resurrect a finished task.

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8
2026-06-15 16:37:34 +02:00
Marcel Klehr
66826df860 fix: Address review comments
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2026-06-15 16:37:34 +02:00
Yoan Bozhilov
0799454a1f fix(taskprocessing): claim tasks atomically with SKIP LOCKED + composite index
Replace the worker retry/ignore-list claim-loop with a single atomic
SELECT ... FOR UPDATE SKIP LOCKED claim (SQLite bounded-retry fallback),
preserving the no-duplicate guarantee while removing the thundering-herd
contention that throttled backlog draining. Add a (status,type,last_updated)
index via the table-creating migration + db:add-missing-indices listener.

Signed-off-by: Yoan Bozhilov <bygadd@gmail.com>
Assisted-by: Claude Code:claude-opus-4-8
2026-06-15 16:37:34 +02:00
Côme Chilliet
802bce0a77
fix: Use token expiration for ephemeral sessions
This simplifies the code a lot.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-15 15:28:38 +02:00
Marcel Klehr
041013bb58 fix(TaskProcessing): Check $progress value is in (0,1) in setTaskProgress
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2026-06-15 10:02:34 +02:00
Nextcloud bot
a7eb76d031
fix(l10n): Update translations from Transifex
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-15 00:23:21 +00:00
Nextcloud bot
eaae45d7dc
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-14 00:22:44 +00:00
Nextcloud bot
d02155784b
fix(l10n): Update translations from Transifex
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2026-06-13 00:24:20 +00:00
Côme Chilliet
1ac195d01e
Merge pull request #61245 from nextcloud/fix/fix-php-warning-in-sharehelper
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Psalm static code analysis / changes (push) Has been cancelled
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled
Psalm static code analysis / static-code-analysis-strict (push) Has been cancelled
Psalm static code analysis / static-code-analysis-summary (push) Has been cancelled
fix: Fix PHP Warning foreach() argument must be of type array|object, null given
2026-06-12 18:38:28 +02:00
Robin Appelman
09d6942c11 chore: fix SearchBinaryOperator constructor type hint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-12 17:43:42 +02:00
Benjamin Gaussorgues
e1eea9bee7
Merge pull request #60972 from nextcloud/feat/clean_crashed_jobs
Job run history cleanup
2026-06-12 15:49:36 +02:00
Kate
718dfd0656
Merge pull request #61142 from nextcloud/chore/php/drop-8.2
chore(PHP): Drop 8.2 for Nextcloud 35
2026-06-12 15:27:12 +02:00
Côme Chilliet
d551047b8a
fix: Fix PHP Warning foreach() argument must be of type array|object, null given
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-12 14:28:42 +02:00
Benjamin Gaussorgues
dc5499af46
feat(jobs): clean old job runs
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-12 13:53:10 +02:00
Benjamin Gaussorgues
28d32d8fff
feat(snowflake): allows to generate Snowflake IDs matching a timestamp
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-12 13:53:10 +02:00
Benjamin Gaussorgues
3956e292b4
feat(jobs): add cleanup job for job run history
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-12 13:53:10 +02:00
Benjamin Gaussorgues
60ce92a697
feat(utils): add getter for serverid with proper default
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-12 13:53:10 +02:00
provokateurin
a7da9cd596
chore(PHP): Drop 8.2 for Nextcloud 35
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-06-12 11:11:50 +02:00
Julien Veyssier
d8477ed7d4 feat(task-streaming): set preferStreaming default value to false, allow setting it with the OCS API
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2026-06-12 10:34:11 +02:00
Benjamin Gaussorgues
621d1328e7
Merge pull request #57227 from lpcvoid/master
fix: allow `occ maintenance:update:htaccess` to create .htaccess file in case it doesn't exist yet
2026-06-12 10:02:05 +02:00