[Bug]: MKCOL not allowed
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
I see an number of requests in my log file where the iOS client is doing requests which are answered by the server with status 405:
150.107.40.35 - ag [31/Dec/2022:08:37:51 +0100] "MKCOL https://*****.****.**/remote.php/dav/files/ag/Photos HTTP/2.0" 405 247 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.6.0" 0.284
Looking into detailed log I find a request
MKCOL /remote.php/dav/files/ag/Photos HTTP/1.1
accept: application/json
Content-Length: 0
X-Real-IP: 150.107.40.35
authorization: Basic *********
Host: nc1.0x42.ch
X-Forwarded-Proto: https
X-Forwarded-By: 192.168.40.64:443
user-agent: Mozilla/5.0 (iOS) Nextcloud-iOS/4.6.0
content-type: application/x-www-form-urlencoded
X-Forwarded-Port: 443
X-Forwarded-For: 150.107.40.35
Forwarded: for=150.107.40.35; proto=https; by=192.168.40.64
ocs-apirequest: true
accept-encoding: br;q=1.0, gzip;q=0.9, deflate;q=0.8
cookie: oc_sessionPassphrase=*****....
accept-language: de-CH;q=1.0, en-CH;q=0.9
with a response:
HTTP/1.1 405
Referrer-Policy: no-referrer
Content-Security-Policy: default-src 'none';
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate
Connection: keep-alive
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
X-Content-Type-Options: nosniff
Content-Type: application/xml; charset=utf-8
Date: Sat, 31 Dec 2022 07:37:51 GMT
Server: nginx/1.22.1
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
It seems as if this method is forbidden for path /remote.php/dav/files but seems to be allowed for /remote.php/dav/uploads.
I'm not sure if this is a problem of the server or the iOS client.
Steps to reproduce
n/a
Expected behavior
No such errors in log file. Failing function to work.
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
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
No response
List of activated Apps
n/a
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the iOS client's handling of MKCOL requests to /remote.php/dav/files and compare it with the server's Allow response. Reproduce the request if possible, then determine whether the client or server is responsible and verify that the failing function works without generating the reported 405 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100