1461 Commits
Author SHA1 Message Date
Claudio Cambra cc5acc3e37 Merge pull request #10997 from Huge/fix/cross-origin-redirect-request-body
fix(network): do not forward request body on cross-origin redirects
2026-11-06 12:11:54 +08:00
Julius van der VaartandClaude Opus 5.5 e9cc282a5b feat: Add Keka extraction temporaries to exclude list
Keka extracts an archive into a temporary <name>.kextraction item and
renames it to the final name when extraction finishes. Excluding the
pattern keeps the client from synchronizing the incomplete output while
Keka is still writing it. The file provider extension receives the same
list from the main app, so both sync modes are covered.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Julius van der Vaart <[email protected]>
2026-11-06 10:51:03 +08:00
Martin Vlach d4b706c921 fix(network): do not forward request body on cross-origin redirects
When handling HTTP redirects, slotFinished stripped the Authorization
header for cross-origin targets, but still resent _requestBody to the
new redirectUrl. This allowed an external origin to receive confidential
request payloads or file data.

Refuse cross-origin redirects when a request body is present. Add a
regression test in testDirectUrlCredentials asserting that request
payloads are never dispatched to cross-origin redirect targets.

Assisted-by: Antigravity:Gemini-3.8-Flash
Signed-off-by: Martin Vlach <[email protected]>
2026-11-06 10:49:48 +08:00
Claudio Cambra 2830588551 Merge pull request #11207 from guruz/master_fix_7797_followup
fix(gui): only list kept read-only items in activities, not every ign…
2026-11-05 12:28:13 +08:00
Markus Goetz f67183deef fix(gui): only list kept read-only items in activities, not every ignored file
This is a followup to #10226
Introduces a proper flag for this read-only remote folder case.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Markus Goetz <[email protected]>
2026-11-04 09:27:16 +01:00
Rello 42afef3040 chore: resolve selective sync configuration merge conflict
Merge master and retain both configuration headers in the theme tests.

Signed-off-by: Rello <[email protected]>
Assisted-by: Codex:GPT-5
2026-11-02 17:47:10 +01:00
Claudio Cambra 73e29ed73f test(file-provider): Cover XPC timeouts and late callbacks
Verify missing and late callbacks, partial results, and preservation of
existing settings when domain discovery or removal fails.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-11-02 17:40:05 +08:00
Claudio Cambra 949f9afc1f test(file-provider): XPC util setup method timeouts
Signed-off-by: Claudio Cambra <[email protected]>
Assisted-by: Codex:GPT-6
2026-11-02 17:40:05 +08:00
Rello 08c1e878cf Merge pull request #11159 from nextcloud/codex/global-scale-internal-links
fix(sharing): generate internal links from Global Scale capabilities
2026-11-02 07:54:51 +01:00
Claudio Cambra 3be6928f90 fix(sync): remove obsolete unique inode index
Drop metadata_unique_inode when opening journals so existing databases
no longer enforce the reverted inode uniqueness constraint. Reset the
version query before schema updates to release its read lock.

Add regression coverage for existing and absent indexes, metadata
preservation, duplicate and zero inode writes, and repeated reopening.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-30 19:52:22 +08:00
Claudio Cambra cea8c06a92 revert(sync): undo unique journal inode index (#11040)
This reverts commit 42ed001c56,
reversing changes made to af03b85fda.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-30 19:52:21 +08:00
Claudio Cambra 0e39820d4a revert(sync): undo journal inode migration fix (#11165)
This reverts commit 4c820c573b,
reversing changes made to 1503e533a2.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-30 19:52:20 +08:00
RelloandClaudio Cambra 9107cacdf7 fix(sharing): address internal link analysis and coverage gaps
Make the synchronous socket helper const and use a function pointer for its static callbacks. Cover journal-based internal links and invalid paths through the socket command, and align flagged documentation comments with the analyzer.

Co-authored-by: Claudio Cambra <[email protected]>

Signed-off-by: Rello <[email protected]>
Signed-off-by: Claudio Cambra <[email protected]>

Assisted-by: Codex:GPT-5
2026-10-30 14:53:13 +08:00
Claudio Cambra 8a288fb863 fix(sync): migrate duplicate and unknown journal inodes safely
Clear duplicate and zero inodes before creating the unique inode index,
preserving the remaining metadata and scheduling remote discovery. Store
unknown inodes as NULL for inserts and local metadata updates, and stop
journal initialization when schema migration fails.

Add regression coverage for legacy duplicate inodes and repeated
unknown-inode records.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-30 13:50:10 +08:00
Rello fc06557a7c fix(sharing): generate internal links from Global Scale capabilities
Replace the private-link DAV lookup with account-level URL generation using globalscale.token when present. Use the shared generator for unified sharing, file details, and filesystem actions, and add regression coverage.

Signed-off-by: Rello <[email protected]>

Assisted-by: Codex:GPT-5
2026-10-29 15:47:48 +01:00
Camila Ayres 4898779b04 fix(propagator): do not upload or create placeholders through symlinks.
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Camila Ayres <[email protected]>
2026-10-28 11:22:43 +00:00
Camila Ayres 6308136511 fix(discovery): handle symlinks the same way in full and partial discovery.
Drop the stale record of a symlinked path in both modes and cover the
propagator checks with a test that replaces a folder by a symlink.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Camila Ayres <[email protected]>
2026-10-28 11:22:42 +00:00
Camila Ayres 03277e6ad7 fix(sync): do not write through local symlinks
Partial discovery skips the local listing, so a local symlink with the name of a
remote folder was not flagged and the client would sync its remote content in the
symlinked folder outside the sync root.

Discovery now checks such paths on disk, drops stale records and reports the symlink as ignored.
A symlinked folder is no longer accepted as the source of a remote move.

Mkdir, download, rename, local remove, folder metadata, removeRecursively,
setModTime and setFolderPermissions also refuse paths that are recognised as symlink.

Assisted-by: ClaudeCode:claude-opus-4-8
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Camila Ayres <[email protected]>
2026-10-28 11:22:41 +00:00
Iva Horn c03f02ab79 fix(file-provider): build the password deletion request with ARC
The XPC utilities and their tests were converted to ARC while #10981 was
in review, and the pull request was merged without a textual conflict.
Its password deletion code still used manual reference counting, so
fileproviderxpc_mac_utils.mm stopped compiling with -fobjc-arc ("ARC
forbids explicit message send of 'release'", "cast of C pointer type
'void *' to Objective-C pointer type ... requires a bridged cast").

Hand the connections back to ARC the way
FileProviderXPC::disconnectFromFileProviderDomain does, and let ARC
manage the semaphore and the test objects.

Refs #9865

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Iva Horn <[email protected]>
2026-10-27 11:37:20 +01:00
Claudio Cambra f3cf3b0f6f Merge pull request #10981 from nextcloud/i2h3/9865-keychain-scope
Restrict File Provider Keychain Scope
2026-10-27 17:40:11 +08:00
Camila Ayres e14956eb22 Merge pull request #11043 from cw-nvdael/feat/managed-override-server-url
feat: resolve overrideServerUrl and overrideLocalDir via managed sett…
2026-10-27 10:20:51 +01:00
Claudio Cambra 42ed001c56 Merge pull request #11040 from nextcloud/bugfix/mgallien/inodeMustBeUnique
fix(db): ensure inode values are unique by adding an index
2026-10-27 16:44:12 +08:00
Claudio Cambra af03b85fda Merge pull request #11052 from v3DJG6GL/fix/activity-ignored-duplicates
fix(activity): avoid duplicate and slow sync error entries
2026-10-27 16:24:31 +08:00
Claudio Cambra 4763ef363c test(macOS): cover notification delegate lifetime
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 51f941129e test(macOS): cover progress observer teardown
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 57c29e0937 test(macOS): cover tray row callbacks and ownership
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 8c84c3d544 test(macOS): cover tray view ownership and tracking
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 120c5ca65a test(macOS): cover native image conversions
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 00835a811a test(macOS): cover security-scoped access lifetimes
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Claudio Cambra 4dff0d53d1 test(macOS): cover native utility ownership
Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-27 12:10:24 +08:00
Nathan van Dael 7d4ee3f6b6 fix(settings): keep the server URL locked in builds that enforce it
- A device default no longer unlocks the server URL in a build that sets
  APPLICATION_SERVER_URL together with APPLICATION_SERVER_URL_ENFORCE.
  Standard builds enable APPLICATION_SERVER_URL_ENFORCE without a URL, so
  a device default stays editable there.
- Say "Invalid path" when --overridelocaldir is given without a path.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Nathan van Dael <[email protected]>
2026-10-26 16:50:31 +01:00
Nathan van Dael f209efb1ec fix(settings): address review feedback on managed override settings
- Return whether setOverrideServerUrl() and setOverrideLocalDir() wrote
  the value, and show a hint when a policy blocks --overrideserverurl or
  --overridelocaldir.
- Reject a --overridelocaldir path that is not absolute while parsing the
  command line, using the schema validator.
- Add ConfigFile::isOverrideServerUrlLocked(), shared by the wizard and
  the nc:// URI scheme handler, so only a policy or command line value
  locks the server URL and restricts login links. Builds enable
  APPLICATION_SERVER_URL_ENFORCE by default, so the wizard now clears the
  lock for a device default.
- Apply an overrideLocalDir from device default or policy only to the
  first account, in the wizard and for account setup from the command
  line. A command line value still applies to the next account. Skip the
  sync options step only for a locked folder.
- Update the docs and add tests.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Nathan van Dael <[email protected]>
2026-10-26 16:50:31 +01:00
Nathan van Dael 2a51533064 feat: resolve overrideServerUrl and overrideLocalDir via managed settings
Signed-off-by: Nathan van Dael <[email protected]>
2026-10-26 16:50:27 +01:00
Camila Ayres e1fa2a3278 Merge pull request #11051 from v3DJG6GL/fix/folderwatcher-symlink-loop
fix(folderwatcher): do not follow directory symlinks and junctions
2026-10-26 16:03:54 +01:00
Claudio Cambra 1912a6e4df Merge pull request #11108 from nextcloud/work/tray-submenu-gap
fix(tray): keep Qt submenus attached to their parent
2026-10-26 22:03:16 +08:00
Claudio Cambra 2d1fd0a828 fix(tests): configure Windows offscreen tray menu fonts
Use the Windows Fonts directory for the offscreen font database and enable capturable Qt test output.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-26 17:57:21 +08:00
Claudio Cambra 1147ea8760 Merge pull request #11081 from nextcloud/work/xpc-arc
fix(file-provider): Build XPC components with ARC
2026-10-26 17:08:24 +08:00
Claudio Cambra 6b2b9d976c fix(macOS): brand FinderSync service error domains
Derive every FinderSync service NSError domain from APPLICATION_REV_DOMAIN
so branded clients report their configured reverse-domain identifier.

Add a regression target that compiles the real service with a nondefault
branding identifier and checks immediate and queued status/menu failures.
Also assert the configured domain in the existing lifecycle tests.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-26 16:01:36 +08:00
Claudio Cambra 386f03add7 fix(tray): keep Qt submenus attached to their parent
Use a minimum menu width so Qt can retain its calculated layout width when
a style needs more than 320 pixels. Add regression coverage for compact
and wide styles opening in both directions.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-26 12:22:29 +08:00
v3DJG6GLandClaude Opus 5.5 5667af065e fix(folderwatcher): do not follow directory symlinks and junctions
When a directory change was detected, FolderWatcher::changeDetected()
and appendSubPaths() enumerated everything below the directory and
followed symlinks to directories. A symlink leading back to one of its
own parents made the recursion walk ever longer paths on the main
thread. In the observed case, a flatpak-builder build-dir contained
var/run -> /run, and the document portal mount below /run exposed the
home directory again; the client stopped responding and grew to about
13 GB.

Symlinked directories and junctions are still reported as changed
paths, but no longer enumerated. Junctions are checked with
QFileInfo::isJunction(), because QFileInfo::isSymLink() is documented
for symbolic links, shortcuts and aliases only. On Linux, newly created
or moved-in directory symlinks no longer get inotify watches registered
through them. Symlinks are never synced, so there are no changes below
them to report.

FolderWatcherChangeDetectionTest calls changeDetected() directly
instead of waiting for platform notifications, so it is also built on
Windows, where FolderWatcherTest is disabled. On Linux, the new symlink
tests fail without this change and pass with it. The junction test
passed in the Windows CI.

Related: #6711, #6746

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: v3DJG6GL <[email protected]>
2026-10-23 12:32:16 +02:00
2ceb1c9c6d fix(activity): avoid duplicate and slow sync error entries
Ignored files with a reason are listed as sync errors. A sync folder with
thousands of ignored files, for example a build folder excluded with
"choose what to sync", slowed down every sync that reports them:

- addErrorToActivityList() did not check whether the error was already
  listed, so later syncs could list the same ignored file again.
- addEntriesToActivityList() rebuilt the tray preview data after every
  added entry, which copies and scans the whole list.
- The cleanup at the start of a sync removed outdated errors one by one.
  Each removal moved all following entries and rebuilt the previews.

Changes:
- Skip an error that is already listed for the same folder.
- Only rebuild the previews when an added entry can be previewed. Sync
  issues never are, and appended rows do not move the previewed ones.
- Add removeActivitiesFromActivityList(). It removes adjacent rows at
  once and rebuilds the previews once. The single removal and the
  cleanup in User::slotProgressInfo() use it.

Behavior changes:
- A repeated error keeps the time it was first listed.
- Adding a sync issue no longer refreshes the relative times shown in
  the tray previews.
- Removing an activity removes all equal entries, not only the first.

ActivityListModelTest covers duplicates, removal and the preview rows.
Two timed tests add and remove 5000 ignored files with a 2 s limit.
Debug build, 5 runs each:
- add: 4.9-5.9 s before, 0.19-0.21 s after
- remove one by one before: 8.0-8.5 s, in one call after: 0.10-0.13 s

The change in User::slotProgressInfo() has no unit test. In a manual run
with 6,466 ignored files, the cleanup took 39.8 s without the batch
removal and 2.3 s with it.

Related: #11047, #10962

Co-authored-by: Camila Ayres <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: v3DJG6GL <[email protected]>
2026-10-23 12:17:17 +02:00
Claudio Cambra e3bab70f9e feat(wizard): support a branded Sign up destination
Add APPLICATION_SIGNUP_URL and use it when opening Sign up in the browser.
Accept absolute HTTP or HTTPS URLs without credentials, falling back to
the existing Nextcloud sign-up page for empty or invalid settings.

Cover URL validation, compiled branding settings and browser dispatch.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-21 16:29:15 +08:00
Claudio Cambra 6314a30765 feat(wizard): allow branding to hide the Sign up button
Add WIZARD_HIDE_SIGNUP_BUTTON, defaulting to OFF, and expose it through
Theme to control the setup wizard's Sign up button.

Cover the compiled branding property and Sign up visibility on the server
and authentication steps. Verify Self-host and Log in remain available
on the server step.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-21 16:29:15 +08:00
Claudio Cambra 591704f432 feat(wizard): allow branding to hide the Self-host button
Add WIZARD_HIDE_SELF_HOST_BUTTON, defaulting to OFF, and expose it through
Theme so the account wizard can hide the Self-host button in branded builds.

Cover the branding property and wizard visibility while keeping Sign up and
Log in available.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-20 18:31:43 +08:00
Iva Horn 12c4699218 fix(file-provider): delete the stored password of domains removed at startup
Domain removal asked the extension to delete its stored password through
the connections configureXPC() sets up. Orphaned domains are removed
during startup before that, so their password stayed in the keychain.
Connect to the extension of the domain being removed instead, which
depends neither on configured nor on still valid connections.

Refs #9865

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Iva Horn <[email protected]>
2026-10-20 10:44:28 +02:00
Iva Horn 7dbfe415ad fix(file-provider): delete the stored password before removing a domain
The extension cannot run once its domain is removed, so the password it
stored would stay in the keychain. Add a request through which the main
app asks the extension of a domain to delete its stored password, and
send it as the first step of every domain removal. The main app waits at
most one second for the reply and removes the domain in any case.

The request is a new method instead of a changed removeAccountConfig
because an extension still running an older build drops a selector it
does not know, which would also drop the existing sign-out handling.

Refs #9865

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Iva Horn <[email protected]>
2026-10-20 10:44:28 +02:00
Claudio Cambra 58f0c15cd2 fix(macOS): compile remaining native application sources with ARC
Enable ARC for Cocoa startup, local network permission probes, FinderSync
services and XPC, the File Provider service, and Sparkle.

Keep application startup in a scoped autorelease pool, balance opaque XPC
references, and detach native delegates before their C++ owners disappear.
Add regression coverage for native object lifetime, queued replies,
cancellation, teardown, and late callbacks.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-20 00:53:16 +08:00
Claudio Cambra 1d1c6e8c5a fix(file-provider): Update XPC tests for ARC ownership
Compile the tests with ARC and adopt retained opaque pointers with bridge
transfers. Check object lifetimes after input owners and autorelease pools
drain, and keep ARC assertions in the implementation files.

Assisted-by: Codex:GPT-6
Signed-off-by: Claudio Cambra <[email protected]>
2026-10-19 23:24:28 +08:00
Matthieu Gallien b8f81a6337 fix(vfs): ensure we keep the virtual state for items during sync
will ensure teh client has proper tracking of which items are virtual
and which items are hydrated or populated

should avoid teh cleint deciding to populate a folder that just got a
change on server but was never visited by the user

Signed-off-by: Matthieu Gallien <[email protected]>
2026-10-16 19:09:05 +02:00
Matthieu Gallien 804340b692 fix(vfs/windows): test that a not populated modified folder is missing
a folder that has not been populated even if modified on the server
should not become populated

Signed-off-by: Matthieu Gallien <[email protected]>
2026-10-16 17:18:38 +02:00