912 Commits

Author SHA1 Message Date
Carl Schwan a213e6bb1d Merge pull request #61011 from nextcloud/carl/cleanup-preview
fix(preview): First cleanup from filecache and then from preview table
2026-06-23 11:08:57 +02:00
Carl Schwan 09aea6312b fix(preview): Don't abort cleanup of previews too early
If we don't find previews in the filecache, this is now normal. Don't
abort and instead delete previews from the new preview table instead.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-22 16:35:33 +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
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
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
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
noah 4b94fd48d1 feat: add a exclude disabled option to last seen
Signed-off-by: noah <noah.oeksuez@cyphersec.eu>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-11 20:21:23 +02:00
provokateurin dd8b4fb384 style(PHP): Fix
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-06-11 20:01:52 +02:00
Ferdinand Thiessen 9bc22fd2c4 chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-06-11 17:19:41 +02:00
Louis 97df391969 Merge pull request #49978 from nextcloud/jtr-feat-setupchecks-limit-type
feat: Run setup checks by category or class
2026-06-11 16:58:21 +02:00
Louis bf4b5ce8d6 Merge pull request #61208 from nextcloud/artonge/fix/psalm_from_60840
fix: Psalm errors from #60840
2026-06-11 16:53:20 +02:00
Louis Chmn 9f6984d0a1 fix(DB): Improve wording about unused indexes
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 16:46:23 +02:00
Louis Chmn 1c48481217 fix: Psalm errors from #60840
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 15:07:54 +02:00
Louis da706223e4 Merge pull request #61140 from nextcloud/fix/fix-deprecations-in-tests
Fix deprecations in tests
2026-06-11 14:48:10 +02:00
Josh 69e3b94594 chore: Add category/class type parameter to setupchecks cmd
Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-06-11 12:24:47 +02:00
Benjamin Gaussorgues 7269f43fab Merge pull request #49697 from nextcloud/appStoreDisabledOcc
feat(occ): Better handling of disabled or unreacheable App store
2026-06-11 11:36:28 +02:00
Louis 73272c36de Merge pull request #60840 from rodrigocorreiaist/feature/db-diagnostics
feat(db): add occ db:info, db:size, db:index-usage and db:locks
2026-06-11 11:29:49 +02:00
Louis 15002cbdc3 Merge pull request #59680 from piepre/occ-token-login-name
feat: allow setting custom login-name for occ generated app password
2026-06-11 10:32:08 +02:00
Marc bfbec605d0 fix: changed wording of error for occ maintenance:update:htaccess
This adds a hint to the error message that file creation may also
have failed.

Signed-off-by: Marc <mail@lpcvoid.com>
2026-06-11 10:23:00 +02:00
Git'Fellow 600178df28 feat(occ): Better handling of disabled or unreacheable App store
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-06-11 10:09:02 +02:00
Benjamin Gaussorgues 73506e8486 chore(deprecated): remove Reflection*::setAccessible as it's noop since PHP 8.1
Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-11 09:45:27 +02:00
Carl Schwan e02fa796c3 fix(preview): Do not recreate preview folder in filecache after cleanup
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-09 11:14:39 +02:00
Carl Schwan d125f61e94 fix(preview): First cleanup from filecache and then from preview table
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-06-08 14:44:00 +02:00
rodrigocorreiaist 29d79d3637 Merge branch 'master' into feature/db-diagnostics 2026-06-03 14:15:00 +01:00
Côme Chilliet 1ab09ec753 chore: Apply new coding standard to all files
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
rodrigocorreiaist 904a5e3640 Merge branch 'master' into feature/db-diagnostics 2026-05-29 15:57:42 +01:00
Benjamin Gaussorgues 1b1c74e848 Merge pull request #60779 from nextcloud/feat/completed_jobs_list
feat(jobs): add command to list executed background jobs
2026-05-29 15:10:04 +02:00
Benjamin Gaussorgues d67eae3501 feat(jobs): add command to list executed background jobs
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-05-29 14:09:06 +02:00
Benjamin Gaussorgues fe757f0cc1 feat(jobs): allow workers to keep track of executed jobs
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-05-29 10:24:00 +02:00
Benjamin Gaussorgues 4ee75168d5 feat(jobs): allow to keep track of job executions
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-05-29 09:14:49 +02:00
Rodrigo Correia 729e1e6920 feat(db): add occ db:info, db:size, db:index-usage and db:locks
Implements RFC #59422. Adds four read-only diagnostic commands to
the occ CLI for administrators to inspect database health without
needing external tools:

- db:info: shows engine version and key config variables with
  health check against recommended values
- db:size: lists all tables ordered by total disk usage
- db:index-usage: reports unused indexes via performance_schema
  (MySQL) or pg_stat_user_indexes (PostgreSQL)
- db:locks: detects active blocking transactions and deadlocks

All commands support MySQL/MariaDB and PostgreSQL. A --json flag
is available for automated parsing. Includes 31 unit tests.

Closes #59422
Signed-off-by: Rodrigo Correia <rodrigo.mendes.correia@tecnico.ulisboa.pt>
Signed-off-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
Co-authored-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
2026-05-27 13:37:40 +01:00
Micke Nordin 1bad4fe238 fix: Make sodium optional
This commit switches the default signature algorithm to
ecdsa-p256-sha256 instead of Ed25519. This allows us to make sodium
optional again, and we only pull it in to use it for verifying incomming
signatures. If sodium is not installed, we throw on Ed25519 signatures
instead. At least it is easy for most people to make their Nextcloud
install fully RFC compliant by installing sodium.

I also renamed all the Ed25519 function names to be more precis, using
Jwks for the JSON Web Keys, and RFC9421 for the http-signature code,
where it is needed to distinguish from draft-cavage signatures.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-05-27 11:03:55 +02:00
Micke Nordin d8cafa1ba5 chore: Fix return values
Use constants instead of 0/1

Also fix PHPDoc to use correct return values.

Co-authored-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Micke Nordin <kano@sunet.se>
2026-05-27 11:03:55 +02:00
Micke Nordin 166bc2c74b feat(http-sig): occ commands to manage Ed25519 keys
ocm:keys:list      list known keys with their slot and kid
  ocm:keys:stage     generate a pending key, advertise via JWKS
  ocm:keys:activate  promote pending -> active, demote previous active
  ocm:keys:retire    delete the retiring key (kid stops resolving)

Plus the autoloader regen covering the new classes from this branch.

Signed-off-by: Micke Nordin <kano@sunet.se>
2026-05-27 11:03:55 +02:00
Peter Ringelmann 4b1c3fbe3b fix(settings,oauth2): preserve wipe state across admin deletion paths
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
2026-05-26 16:41:02 +02:00
Enjeck C. 53cddbbe8b feat(occ): make it possible to remove an arbitrary number of users to a group
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
2026-05-19 23:53:24 +02:00
Arthur Schiwon bc157a92cc feat(occ): make it possible to add an arbitrary number of users to a group
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2026-05-19 23:53:24 +02:00
piepre 8998905064 feat: allow setting custom login-name for occ generated app password
Signed-off-by: piepre <piepre@gmx.de>

Update core/Command/User/AuthTokens/Add.php

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: piepre <piepre@gmx.de>
2026-05-19 11:39:33 +02:00
Ferdinand Thiessen 1c23feae3d refactor: migrate usage of OC_App to AppManager
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-13 14:01:49 +02:00
Marcel Klehr b2ffaaf147 Merge pull request #59958 from nextcloud/feat/setupcheck-taskprocessing-worker
Feat: Better reporting if something is wrong with taskprocessing
2026-04-29 12:07:20 +02:00
Marcel Klehr cbaf5fa99f fix(TaskProcessingWorker): Adjust config key name
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2026-04-29 10:11:25 +02:00
Joas Schilling a0fedf1c7f Merge pull request #59985 from nextcloud/chore/psalm-v6
chore: update psalm to v6
2026-04-29 07:20:29 +02:00
Ferdinand Thiessen b1739626c4 Merge pull request #56720 from nextcloud/jtr/occ-app-remove-refactor
feat(app): allow removing installed-but-disabled apps; improve help & logging
2026-04-29 01:37:08 +02:00
Ferdinand Thiessen 20acaf307e chore: add missing Override attribute to core code
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 21:29:28 +02:00
Ferdinand Thiessen 2a8aaf9c0a chore: adjust code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 17:24:56 +02:00
Marcel Klehr f0a3b335e6 fix(TaskProcessingWorker): Only store config value every 60s
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2026-04-28 15:53:04 +02:00
Josh e97cf02574 feat(app): allow removing installed-but-disabled apps; improve help & logging
- Allow removal of apps that are installed but currently disabled
 - Add explicit installed check (getAppPath) with clear message when not installed
- Expand help text to document uninstall behavior and --keep-data
 - Mirror console messages to logs for key events and consolidate exception logging
- miscellaneous code tidying

Signed-off-by: Josh <josh.t.richards@gmail.com>
2026-04-28 13:51:48 +02:00
Marcel Klehr 3802c0d24a feat(TaskProcessing): Add setup check for task processing worker status
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2026-04-28 11:43:03 +02:00
Ferdinand Thiessen a974d00571 feat: add new IRepairStepExpensive interface
Expensive repair steps are non-critical repair steps that might take a long time to execute.
Non-critical means that they are not required to directly be executed during migration to have a working instance,
but they might be required to have a fully working instance later on.

Expensive repair steps are only executed when explicitly requested by the administrator.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-27 20:03:44 +02:00
Joas Schilling d6ee1eafa3 fix(updater): Make "maintenance mode kept active" more obvious
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-09 09:10:21 +02:00