Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Problem with external storage (WebDAV) and folder names with "+" in it, in combination with Synology WebDav server or rclone Webdav server #42932

Closed
5 of 8 tasks
johnny-gonzales opened this issue Jan 18, 2024 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug

Comments

@johnny-gonzales
Copy link

johnny-gonzales commented Jan 18, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

I connect my Nextcloud instance with my Synology with installed WebDAV server. Same thing happens also with the rclone webdav server.
If there is a folder with a "+" in the name on the Synology then Nextcloud removes the + from the name and subsequently gets an access error because the name is not found.
It works well with files, the problem only exists with folders.

Error (raw see below):
[webdav] Fehler: Sabre\HTTP\ClientHttpException: Not Found
PROPFIND /remote.php/dav/files/Martin/synbackup/d/aaa/a%20b/
von 5.83.183.34 von xxx um 18.01.2024, 12:02:09

The error message shows the "+" (%2b) substituted with a space (%20), so there was a conversion somewhere.

If I actually connect the external storage with the Nextcloud instance itself, then it works. So the problem seems to only occur in the combination with the synology webdav server or rclone Webdav server.
Happens with php 8.3 and 8.2.

Steps to reproduce

  1. Connect Nextcloud with external storage and Webdav to a Synology webdav server or a rclone webdav server. To setup a rclone webdav server simply execute "rclone serve webdav ".
image
  1. On the file system I create a folder with a + in the name:
image
  1. On WinSCP I verify that everything works well, therefore I assume the problem is not on the webdav server:
image
  1. If I look at it from Nextcloud the "+" is exchanged by a space " ".
image
  1. When I get into the folder from Nextcloud, the content is empty:
image
  1. That activity triggers an error entry in the sys logs:
image

Expected behavior

Folders with + in the name can be properly accessed.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 22.1 to 22.2)

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

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "",
            "",
            ""
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "nc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtptimeout": 30,
        "mail_smtpport": "465",
        "forcessl": true,
        "theme": "",
        "maintenance": false,
        "overwritewebroot": "",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
        "forceSSLforSubdomains": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "port": 6379
        },
        "loglevel": 2,
        "trashbin_retention_obligation": "auto",
        "updater.release.channel": "stable",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "htaccess.RewriteBase": "\/",
        "simpleSignUpLink.shown": false,
        "default-language": "",
        "mysql.utf8mb4": true,
        "app_install_overwrite": [
            "apporder",
            "bookmarks",
            "files_rightclick"
        ],
        "default_phone_region": "+49",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "allow_local_remote_servers": true
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - bookmarks: 13.1.3
  - bruteforcesettings: 2.8.0
  - calendar: 4.6.3
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.1
  - contactsinteraction: 1.9.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - groupfolders: 16.0.3
  - guests: 3.0.1
  - integration_openstreetmap: 1.0.11
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - notify_push: 0.6.7
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - polls: 6.0.1
  - previewgenerator: 5.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - quota_warning: 1.18.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.1
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - spreed: 18.0.1
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - circles: 28.0.0-dev (installed 0.13.6)
  - dashboard: 7.8.0 (installed 7.0.0)
  - encryption: 2.16.0 (installed 2.13.0)
  - recommendations: 2.0.0 (installed 0.4.0)
  - suspicious_login: 6.0.0 (installed 6.0.0)
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"hZAi4lwuDldyL3TAHqXO","level":3,"time":"2024-01-18T11:02:09+00:00","remoteAddr":"5.83.183.34","user":"Martin","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/Martin/synbackup/d/aaa/a%20b/","message":"Sabre\\HTTP\\ClientHttpException: Not Found","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","version":"28.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Sabre\\HTTP\\ClientHttpException: Not Found","Code":0,"Trace":[{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":83,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":971,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/apps/dav/lib/Server.php","line":370,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/data/www/nextcloud/remote.php","line":172,"args":["/data/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/data/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","Line":217,"message":"Sabre\\HTTP\\ClientHttpException: Not Found","exception":[],"CustomMessage":"Sabre\\HTTP\\ClientHttpException: Not Found"},"id":"65a9055bf0c07"}

Additional info

No response

@johnny-gonzales johnny-gonzales added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 18, 2024
@solracsf
Copy link
Member

See also #40943

@johnny-gonzales johnny-gonzales changed the title [Bug]: Problem with external storage (WebDAV) and folder names with "+" in it, in combination with Synology WebDav server [Bug]: Problem with external storage (WebDAV) and folder names with "+" in it, in combination with Synology WebDav server or rclone Webdav server Jan 19, 2024
@johnny-gonzales
Copy link
Author

johnny-gonzales commented Jan 19, 2024

The problem does not only occur with the Synology webdav server, exactly the same thing happens also with the rclone webdav server. I changed the title and description.
Rclone webdav server is very easy to setup.

To reproduce:
start rclone with "rclone serve webdav /data" and connect Nextcloud to it.

@szaimen
Copy link
Contributor

szaimen commented Jan 29, 2024

Cc @nextcloud/server-frontend

@skjnldsv
Copy link
Member

@szaimen not sure that is a frontend issue 🤔

@skjnldsv
Copy link
Member

#40943

@skjnldsv skjnldsv closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2024
@johnny-gonzales
Copy link
Author

The fix in #40594 / #40943 indeed fixes the problem; great!
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback bug
Projects
None yet
Development

No branches or pull requests

4 participants