nextcloud / nextcloud/ios

open folder containing `#` results in 405 error

Open
#1,196 5 comments 2 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

Expected behaviour

open folder containing # sign

Actual behaviour

405 error message

hash is not encoded right. Works perfectly in Android App.

Server error message
{"reqId":"k17J7PpoAREU7opftXGj","level":0,"time":"2020-03-23T20:52:32+00:00","remoteAddr":"87.165.126.121","user":"denniseisen","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/Royal%20Rangers/Royal%20Rangers%2059/2","message":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name Royal Rangers/Royal Rangers 59/2 could not be located","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":967,"function":"getNodeForPath","class":"OCA\\DAV\\Connector\\Sabre\\ObjectTree","type":"->","args":["Royal Rangers/Royal Rangers 59/2"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["Royal Rangers/Royal Rangers 59/2",["{DAV:}getlastmodified","{DAV:}getetag","{DAV:}getcontenttype","{DAV:}resourcetype","{DAV:}quota-available-bytes","{DAV:}quota-used-bytes","{DAV:}creationdate","{http://owncloud.org/ns}permissions","{http://owncloud.org/ns}id","{http://owncloud.org/ns}fileid","{http://owncloud.org/ns}size","{http://owncloud.org/ns}favorite","{http://owncloud.org/ns}share-types","{http://owncloud.org/ns}owner-id","{http://owncloud.org/ns}owner-display-name","{http://owncloud.org/ns}comments-unread","{http://nextcloud.org/ns}is-encrypted","{http://nextcloud.org/ns}has-preview","{http://nextcloud.org/ns}mount-type","{http://nextcloud.org/ns}rich-workspace"],0]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://lunaline.de/remote.php/webdav/Royal%20Rangers/Royal%20Rangers%2059/2","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPropFind"],[{"absoluteUrl":"https://lunaline.de/remote.php/webdav/Royal%20Rangers/Royal%20Rangers%2059/2","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PROPFIND",[{"absoluteUrl":"https://lunaline.de/remote.php/webdav/Royal%20Rangers/Royal%20Rangers%2059/2","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://lunaline.de/remote.php/webdav/Royal%20Rangers/Royal%20Rangers%2059/2","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":165,"args":["/var/www/html/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/ObjectTree.php","Line":173,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/2.25.9","version":"18.0.1.3"}
Steps to reproduce

open folder containing # in iOS Nextcloud App

Reasoning or why should it be changed/implemented?

its a bug

iOS version

13.3.1

App version

2.25.9.2

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

Start by reproducing the issue in the iOS app with a folder whose name contains #, then inspect the WebDAV PROPFIND request and its URL encoding. Done means the folder opens successfully instead of returning a 405 error, matching the Android app behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.