nextcloud / nextcloud/ios

Bug "special char"

Open
#1,166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

All tests done with a file named "ma il cielo è sempre piú blu.docx", file type doesn't seem to matter:

  1. Get request for file
    192.168.1.50 - admin [19/Feb/2020:14:58:18 +0000] "GET /remote.php/webdav/Documents/ma%20il%20cielo%20%C3%A8%20sempre%20pi%C3%B9%20blu.docx HTTP/1.1" 200 12721 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
    200 OK

  2. Copying using "Share" and "Save to files" in iOS files app to a different folder:
    192.168.1.50 - admin [19/Feb/2020:14:34:17 +0000] "PUT /remote.php/webdav/Documents/ma%20il%20cielo%20e%CC%80%20sempre%20piu%CC%80%20blu.docx HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
    200 OK

  3. Copying using "Share" and "Save to files" in iOS files app within the same folder:
    192.168.1.50 - admin [19/Feb/2020:14:46:32 +0000] "PUT /remote.php/webdav/Documents/ma%20il%20cielo%20e%CC%80%20sempre%20piu%CC%80%20blu.docx HTTP/1.1" 204 668 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
    204 CONTENT NOT AVAILABLE

Same without special characters:
192.168.1.50 - admin [19/Feb/2020:15:34:27 +0000] "PUT /remote.php/webdav/Documents/Test/ma%20il%20cielo%20e%20sempre%20piu%20blu%201.docx HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
201 CREATED

  1. Duplicate in iOS files app
    No request in Webserver log, just an error message in files app:
    Can't copy "ma il cielo è sempre piú blu.docx"
    The file "ma il cielo è sempre piú blu.docx" couldn't be copied because it either doesn't exist or the folder it is being copied to doesn't exist.
    And after repeating a couple of times step 3, it works as expected and creates a file with a number:
    192.168.1.50 - admin [19/Feb/2020:15:01:06 +0000] "PUT /remote.php/webdav/Documents/ma%20il%20cielo%20e%CC%80%20sempre%20piu%CC%80%20blu%201.docx HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
    201 CREATED

  2. Copy and paste in iOS files app within the same folder:
    Can't copy "ma il cielo è sempre piú blu.docx"
    The file "ma il cielo è sempre piú blu.docx" couldn't be copied because it either doesn't exist or the folder it is being copied to doesn't exist.
    And after repeating a couple of times step 3, it works as expected and creates a file with a number. Request's the same as in step 4.

  3. Create a new file "ma il cielo è sempre piú blu.txt" in Notes App via "Share" and "Save to files"

Can't Copy "text.txt"
The file "text.txt" couldn't be copied because it either doesn't exist or the folder it is being copied to doesn't exist.
Same file without special characters:

192.168.1.50 - admin [19/Feb/2020:15:32:41 +0000] "PUT /remote.php/webdav/Documents/ma%20il%20cielo%20e%20sempre%20piu%20blu.txt HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
201 CREATED

After some debugging we've found that there seem to be different types of encoding in use, UTF-8 normalization form C and UTF-8 normalization form D. Link: https://sabre.io/dav/character-encoding/
Maybe this helps. PUT requests from iOS Files app are in normalization form D, the same requests from Nextcloud App in normalization form C.
Encoding example in Nextcloud app:
192.168.1.50 - admin [19/Feb/2020:15:50:27 +0000] "PUT /remote.php/webdav/Documents/Nctest/ma%20il%20cielo%20%c3%a8%20sempre%20pi%c3%b9%20blu.docx HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"
Encoding example in Files app:
192.168.1.50 - admin [19/Feb/2020:15:48:50 +0000] "PUT /remote.php/webdav/Documents/Fatest/ma%20il%20cielo%20e%CC%80%20sempre%20piu%CC%80%20blu.docx HTTP/1.1" 201 724 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the iOS Files app using the filename “ma il cielo è sempre piú blu.docx,” then compare the logged PUT requests from Files and the Nextcloud app. Inspect the iOS app’s WebDAV or file-provider integration; done means normalized filenames can be copied, duplicated, and created consistently without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.