-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
WebDAV: MKCOL in non edit shared folder returns HTTP result code 201 #2127
Comments
Blind guess: what happens if you put "return " in front of this line? https://github.com/owncloud/core/blob/master/lib/connector/sabre/directory.php#L110 |
or probaby not, if it is what is called by DAV/FS/Directory.php then the return value is not considered anyway. Maybe we need to throw an Exception, i am not too familiar with Sabre. Maybe @icewind1991 or @butonic know better? |
okay, when more while i am browsing through this. Btw, why does Sabre not implement HTTP 418? |
according to http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL we should return 403 |
@evert 😄 |
@evert I meant it did not found return of 418 (just grep'ed through em files) ;) |
So instead of \OC\Files\Filesystem::mkdir($newPath) we would write
Does this work, @dragotin ? |
Please commit that! |
Great, there you go! |
return 403 when mkdir failed on webDAV, fixes #2127
This is about a read-only shared folder, that appears in the Shared directory. If I do the WebDAV command MKCOL there to create a new directory, the server replies with status code 201, which means created. However, the directory is not created, which is correct, because the share is read only. But the server should rather return with 403 Forbidden for example.
Easily reproducable with a webdav client, just open a read only shared dir and try MKCOL.
The text was updated successfully, but these errors were encountered: