nextcloud / nextcloud/desktop

Avoid parenthesis chars '(', ')' for domain folder names on macOS VFS (File Provider)

Open
#10,775 3 comments 0 reactions 0 assignees View on GitHub
0. Needs triage feature: :file_folder: file provider os: :apple: macOS
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

### ⚠️ Before submitting, please verify the following: ⚠️

- [x] This is a **bug**, not a question or a configuration issue.
- [x] This issue is **not** already reported on Github (I have searched for it).
- [x] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

The macOS VFS (File Provider) client includes the Nextcloud display (user) name for the local folder name (under `~/Library/CloudStorage/`). This can be problematic if the display name includes special characters like `(` or `)` that are interpreted by some shells. As a consequence, whenever this path is used in a shell it will not work as intended unless special characters are escaped or the entire path is quoted.

### Steps to reproduce

1. Log in to a Nextcloud server as a user with a name that includes parentheses
2. Open a Terminal and navigate to the Nextcloud folder under `~/Library/CloudStorage`
3. This path must be quoted or special characters (the parentheses in this example) need to be escaped in order for it to work in the shell

### Expected behavior

Nextcloud should sanitize the folder name on macOS, i.e. by replacing or removing all special characters that shells interpret. In this example, the parentheses should be removed before creating the folder under `~/Library/CloudStorage`.

Alternatively, Nextcloud could also use a safe scheme to create the folder name. In my case, the folder name is very long (because my user name is very long) - maybe there is a unique shorter name that could be used (which doesn't contain any special characters either). This would actually be my preferred solution.

### Which files are affected by this bug

N/A

### Operating system

macOS

### Which version of the operating system you are running.

macOS 26.6.2

### Installation method

Official Installer for macOS 13 and later

### Nextcloud Server version

34.0.3

### Nextcloud Desktop Client version

34.0.3

### Did this occur after an update or on a clean installation?

Clean desktop client installation

### Are you using the Nextcloud Server Encryption module?

No

### Are you using an external user-backend?

- [ ] Default internal user-backend
- [ ] LDAP or Active Directory
- [ ] SSO - SAML
- [ ] Other

### Nextcloud Server logs

```shell

```

### Additional info

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the macOS VFS (File Provider) code that creates the domain folder under ~/Library/CloudStorage. Reproduce the issue with a display name containing parentheses and compare the requested sanitization with the proposed shorter safe-name alternative. Done means the generated folder name is shell-safe without breaking its identity or creation on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.