Skip to content

[Bug]: uploading a folder into a folder, wich name starts with # fails using any browser #62716

Open
nextcloud-libraries/nextcloud-upload
#2236

Description

@ymum19

⚠️ This issue respects the following points: ⚠️

Bug description

Errors when uploding folders with files into a folde whose name starts with #
i.E. #test, #Infos, ...

Steps to reproduce

  1. use a browser fpr uploading a folder from ypur local data
  2. create a new folder at server named i.e. #testupload (name has to start with #) and go into
  3. use ui (new , ulpload folder ) or use mouse to drop a local folder
  4. Errors: the folder does not exist any more

-> files were uploaded , folders not

Expected behavior

Folder Upload into any folder at server as it has been working before 33

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

None

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

using Nextcloud 33.0.6 hostet by Hetzner as StorageShare

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jul 31, 2026
  2. added theissue type on Jul 31, 2026
  3. moved this from To triage to Triaged in 🧑‍🤝‍🧑 Community triageon Jul 31, 2026
  4. brlin-tw commented on Oct 22, 2026

    @brlin-tw
    Contributor

    Seems to be a regression of #59294, see: #59294 (comment)

  5. Overdrive4954 commented on Oct 27, 2026

    @Overdrive4954

    Still reproducible on 34.0.5 (Debian 13, nginx 1.26.3, PHP 8.4.27), with both drag-and-drop and New → Upload folder, in Chrome 156 (Linux) and Chrome 148 (macOS).

    It also happens when the # is in any parent of the current folder, not only the current folder's own name (e.g. #test/Sub folder).

    The access log shows the uploader computes the new folder's path truncated at the #. With Upload folder, it checks the correct path, then sends MKCOL to the user's root:

    PROPFIND /remote.php/dav/files/admin/%23test/Sub%20folder/brandnew2/       404   <- correct path, needs creating
    MKCOL    /remote.php/dav/files/admin                                        405   <- expected …/%23test/Sub%20folder/brandnew2/
    PUT      /remote.php/dav/files/admin/%23test/Sub%20folder/brandnew2/a.jpg  404
    

    With drag-and-drop, it checks the truncated path, finds the root exists, and never sends MKCOL:

    PROPFIND /remote.php/dav/files/admin/%23test/Sub%20folder/   207
    PROPFIND /remote.php/dav/files/admin                          207   <- expected …/%23test/Sub%20folder/brandnew/
    PUT      /remote.php/dav/files/admin/%23test/Sub%20folder/brandnew/a.jpg   404
    

    The file PUTs and the destination PROPFIND encode the # correctly as %23; only the path used for creating the new folder loses everything from the # onward. Uploading a folder whose own name contains # (from a parent without #) works correctly, and folder uploads into subfolders without # (e.g. Documents) also work, so the general fix for #58454 / #59672 is in place on this instance. This looks like the # case surviving that fix.

    Workarounds for affected users: create the destination folder manually and upload the files into it (single-file uploads are unaffected), or rename the parent folder to remove the #.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap33-feedbackbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions