Skip to content

Renaming a file with a slash in the filename makes the file inaccessible (dataloss) #1893

Closed

Description

@tbsbdr

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

  • Renaming a file with a slash in the filename makes the file inaccessible
  • Cant' create or upload files with "" in filename
  • Downloading a file with a slash in the filename fails

Reproduction Steps

rename file and make it inaccessible

  1. there is an existing file vacation.jpg
  2. rename the file to vaca\tion.jpg
  3. click on vaca\tion.jpg to open it
  4. cant open or download file

other issues you can create with a backslash:

Cant create file:
2. New -> Create Markdown1. Filename bla\bla.txt

  1. Error: "failed to create file"
Image

cant download file

  1. select existing resource
  2. rename it to bla\bla
  3. download bla\bla
  4. Error: download failed
  5. renaming it back to a name without a slash does not work, error "failed to rename bla\bla" --> file can not
Image

cant upload file

  1. create lcoal file bla\bla
  2. upload bla\bla (drag and drop or via "upload"
  3. error: "Parent folder does not exist"
Image

Expected Outcome

  • create / upload / download of files with backslash is possible or
  • tell the user, that the filename must not contain a backslash and have no files with backslashes in the cloud

Actual Outcome

  • can not upload/download/create files with backslash in filename

Activity

  1. tbsbdr commented on Jan 28, 2026

    @tbsbdr
    MemberAuthor

    @kulmann Asessing as P2, because if I rename the file, I can not download it any more and renaming it back to a proper name is also not possible -> dataloss.

  2. changed the title [-]Cant create, upload or download files with "\" in filename - missing validation?[/-] [+]Ranming a file with a slash in the filename makes the file inaccessible (dataloss)[/+] on Jan 28, 2026
  3. changed the title [-]Ranming a file with a slash in the filename makes the file inaccessible (dataloss)[/-] [+]Renaming a file with a slash in the filename makes the file inaccessible (dataloss)[/+] on Jan 28, 2026
  4. JammingBen commented on Jan 29, 2026

    @JammingBen
    Member

    I tried with my local dev setup and couldn't reproduce the issue. File names with any special chars (except forward-slashes, those are forbidden) can be opened/edited/deleted without a problem.

    However, on the demo instance as well as locally with our compose project I can reproduce this error, not only with a backslash \, but also with a hash # in the filename. I think this should work though? @micbar @rhafer do you have any insight, maybe somehow related to the storage?

    create lcoal file bla\bla
    upload bla\bla (drag and drop or via "upload"
    error: "Parent folder does not exist"

    The error message is very misleading indeed, the web client shows it on every 412 error. We should adjust that.

  5. moved this from Qualification to Prio 2 in OpenCloud Team Boardon Jan 29, 2026
  6. AlexAndBear commented on Feb 2, 2026

    @AlexAndBear
    Member

    This is not a OpenCloud problem but a problem with Traefik + OpenCloud in conjunction. Since Traefik 3.6.4 we need to configure the allowed encoded characters (opencloud-eu/opencloud-compose#173) and back slash was not part of the list yet. Fixing it in our opencloud-compose project.

    opencloud-eu/opencloud-compose#211

  7. self-assigned this
    on Feb 2, 2026
  8. v-scharf commented on Feb 2, 2026

    @v-scharf
    Contributor

    This is not a OpenCloud problem but a problem with Traefik + OpenCloud in conjunction.

    opencloud also has problems with backslash:
    I tested it on opencloud binary
    see here opencloud#2239

    • create folder with \ - works ✅️ with spaces dav path, doesn't work ❌️ with new or old dav path
    • create file with \ - doesn't work ❌️
    • rename file or folder with \ - works ✅️ with spaces dav path, doesn't work ❌️ with new or old dav path
    • download file with \ - doesn't work ❌️
  9. aduffeck commented on Feb 2, 2026

    @aduffeck
    Member

    I was also looking into that from the server perspective. Backslashes are actually forbidden by default in our config, but that validation apparently only happens for new files, not for files being renamed.

    I'm not sure if we want to keep it forbidden moving forward, but I'll try to enable the validator for renames as well regardless.

  10. JammingBen commented on Feb 2, 2026

    @JammingBen
    Member

    Yeah, there are still quite some inconsistencies in the server as well as in the client. E.g. for spaces we don't allow backslashes on the client side, but for normal files and folders we do.

    @tbsbdr wanted to align with the Desktop client so we can create some common ground here. So the main p2 issue is fixed IMO, but there is still follow-up work to do.

  11. added a commit that references this issue on Feb 2, 2026
    898d591
  12. AlexAndBear commented on Feb 2, 2026

    @AlexAndBear
    Member

    We decided not having back slashes in resource names, this was already half-way implemented in the backend, the front-end validation has been adjusted: #1916

  13. added a commit that references this issue on Feb 9, 2026
    0fadaed
  14. added a commit that references this issue on Feb 9, 2026
    4433469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions