nextcloud / nextcloud/desktop

[Bug]: Trailing / is removed in linux client leading to incorrect public link detection

Open
#9,024 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

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've searched 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

In #8929 public link detection was fixed for URLs containing a trailing `/`, eg: `https://example.com/s/nextcloud/`

This works in Windows version of the client after manually adding `/` to the end of the URL in nextcloud.cfg file and the trailing `/` does not get removed.

In Linux client however the trailing `/` is removed. Client should keep the trailing `/` or should allow to specify that the link is not a public link.

### Steps to reproduce

1. Create a Nextcloud Server available under a subpath: `https://example.com/s/nextcloud/`
2. Observe that you can't sync it in the linux desktop client, because the client assumes this is a share link.
3. Adding `/` doesn't solve the issue as the client removes it.

### Expected behavior

Client should not remove the trailing `/` in the linux client which will allow #8929 fix to work or should allow to specify that the link is not a public link.

### Which files are affected by this bug

the whole server is affected

### Operating system

Linux

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

Archlinux

### Package

Distro package manager

### Nextcloud Server version

doesn't matter

### Nextcloud Desktop Client version

nextcloud-client-2:4.0.1-1

### Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 3.16.3 to 3.17.0)

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

Encryption is Disabled

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

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

### Nextcloud Server logs

```shell

```

### Additional info

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.