nextcloud / nextcloud/desktop

[Bug]: Chunked upload content-type is causing trouble with WAAPs

Open
#8,612 2 comments 0 reactions 0 assignees View on GitHub
1. to develop bug confirmed good first issue Prio: normal
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

The url-encoded body data is heavily causing trouble with the WAAP when it tries to analyze the body data.
The encoding of the upload data is:
content-type: application/x-www-form-urlencoded
which seems a bit strange for file uploads.
WAAP will expect to have it content-type: application/octet-stream.
Therefor it will be blocked due to wrong encoding (failed_check: valid_UTF-8)

### Steps to reproduce

Upload a larger binary file, like a .zip file.

### Expected behavior

content-type: application/octet-stream. and file will be uploaded.

### Which files are affected by this bug

xyz.zip

### Operating system

Linux

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

Fedora 42

### Package

Distro package manager

### Nextcloud Server version

31.0.8

### Nextcloud Desktop Client version

3.16.3daily (Fedora)

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

Fresh desktop client install

### 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

Running in K3s, installed via Helm
repo: https://nextcloud.github.io/helm/
version: 7.0.2

The same issue was fixed in the IOS version as it seems:
https://github.com/nextcloud/ios/issues/1942

But at least the Linux client seems to have the same issue and it affects not only ModSec.
As workaround I used my Android Phone to upload the file...

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.