Skip to content

[Bug]: Calendar search generates invalid links when username contains spaces #54430

@akn01

Description

@akn01

⚠️ This issue respects the following points: ⚠️

Bug description

When using the global search in Nextcloud to find calendar events, the generated links are broken if the account username contains spaces. The search output does not URL-encode the space(s) in the username within the CalDAV path, which results in a "The event does not exist" error when opening the link.

Example with Base64‑encoded links decoded:

Search result link (broken):

/remote.php/dav/calendars/John Doe/private/5AF2BF68-DFE6-4C66-B03C-00F7782733DD.ics

Correct working link decoded:

/remote.php/dav/calendars/John%20Doe/private/5AF2BF68-DFE6-4C66-B03C-00F7782733DD.ics

Steps to reproduce

  1. Create a user account in Nextcloud with a space in the username (e.g., John Doe).
  2. Create a calendar event in that account’s personal calendar (private).
  3. Use the global search to find the event.
  4. Click the link from the search results.
  5. Observe that the link is broken and the event cannot be opened.

Workaround:

  • Manually replace spaces ( ) with %20 in the URL.
  • Use usernames without spaces (not ideal).

Expected behavior

Spaces in usernames (and other special characters) should be properly URL-encoded in all search-generated links.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Metadata

Metadata

Assignees

Type

Projects

Status

☑️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions