Skip to content

fix(integrations): preserve Nextcloud subpaths - #6295

Open
arturict wants to merge 2 commits into
homarr-labs:devfrom
arturict:fix/3597-nextcloud-subpath
Open

fix(integrations): preserve Nextcloud subpaths#6295
arturict wants to merge 2 commits into
homarr-labs:devfrom
arturict:fix/3597-nextcloud-subpath

Conversation

@arturict

@arturict arturict commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • point the Nextcloud calendar client at Nextcloud's canonical /remote.php/dav/ endpoint
  • preserve the configured installation path when Nextcloud is hosted below a subpath
  • keep already-complete /remote.php/dav integration URLs idempotent
  • add regression coverage for root, subpath, trailing-slash, existing-endpoint, and DAV client configuration cases

tsdav performs well-known discovery from the origin and therefore drops a configured path such as /nextcloud. Supplying the canonical DAV endpoint as its server URL keeps that path available as a discovery fallback without changing the integration URL used by notifications or external links.

Fixes #3597.

Verification

  • NODE_ENV=development CI=true pnpm exec vitest run packages/integrations/src/nextcloud/test/nextcloud-url.spec.ts packages/integrations/src/nextcloud/test/nextcloud-integration.spec.ts — 5 tests passed
  • pnpm --filter @homarr/integrations typecheck — passed
  • pnpm --filter @homarr/integrations lint — passed with 0 errors (existing package warnings only)
  • pnpm exec oxfmt --check on all changed files — passed
  • git diff --check — passed

Checklist

  • Builds without warnings or errors (pnpm build, autofix with pnpm format:fix) — full build not run; targeted checks are listed above
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used
  • Documentation is up to date; no configuration or user workflow changed

@arturict
arturict requested a review from manuel-rw as a code owner July 11, 2026 14:58
@dokploy-homarr-labs

Copy link
Copy Markdown

🚨 Preview Deployment Blocked - Security Protection

Your pull request was blocked from triggering preview deployments

Why was this blocked?

  • User: arturict
  • Repository: homarr
  • Permission Level: read
  • Required Level: write, maintain, or admin

How to resolve this:

Option 1: Get Collaborator Access (Recommended)
Ask a repository maintainer to invite you as a collaborator with write permissions or higher.

Option 2: Request Permission Override
Ask a repository administrator to disable security validation for this specific application if appropriate.

For Repository Administrators:

To disable this security check (⚠️ not recommended for public repositories):
Enter to preview settings and disable the security check.


This security measure protects against malicious code execution in preview deployments. Only trusted collaborators should have the ability to trigger deployments.

🛡️ Learn more about this security feature

This protection prevents unauthorized users from:

  • Executing malicious code on the deployment server
  • Accessing environment variables and secrets
  • Potentially compromising the infrastructure

Preview deployments are powerful but require trust. Only users with repository write access can trigger them.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Nextcloud CalDAV URL handling

Layer / File(s) Summary
CalDAV URL construction and validation
packages/integrations/src/nextcloud/nextcloud-url.ts, packages/integrations/src/nextcloud/test/nextcloud-url.spec.ts
Adds a helper that preserves the integration path, appends /remote.php/dav/, removes query and hash components, and tests root, subpath, trailing-slash, and existing-endpoint URLs.
Calendar client URL wiring
packages/integrations/src/nextcloud/nextcloud.integration.ts, packages/integrations/src/nextcloud/test/nextcloud-integration.spec.ts
Configures DAVClient with the constructed server URL and verifies the value passed during calendar client creation.

Suggested reviewers: manuel-rw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address the subpath discovery bug by preserving the configured path in the DAV server URL and adding regression tests.
Out of Scope Changes check ✅ Passed All changes are directly related to the Nextcloud subpath fix and its test coverage.
Yagni / Over-Engineering ✅ Passed Uses stdlib URL, one tiny pure helper, and minimal tests; no new dependency or extra abstraction beyond the fix.
Docs Are Up To Date ✅ Passed No docs changes were needed: this PR only adjusts Nextcloud DAV URL construction, and the existing Nextcloud docs page already exists and remains accurate.
Title check ✅ Passed The title is concise and accurately summarizes the main change: preserving Nextcloud subpaths in the integration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: nexcloud integration with subpaths do not work

1 participant