A overwritten file with inside "share_folder" doesnt returns checksum
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Steps to reproduce
- Set "shares_folder" to
Shares
occ config:system:set --value 'Shares' --type string share_folder
- as admin create file
lorem.txtand share with another usertest123 - as
test123overwrite the received share with checksum
curl -XPUT http://localhost/core/remote.php/dav/files/test123/Shares/lorem.txt -d 'hello world new' -H 'OC-Checksum: SHA1:17b6b669b2361937cc739e2203243447cfd4678b' -u test123:test123 -v
- as
test123try to get the checksum of the updated file
curl -XPROPFIND http://localhost/core/remote.php/dav/files/test123/Shares/lorem.txt -d '<?xml version="1.0"?><d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:prop><oc:checksums /></d:prop></d:propfind>' -u test123:test123 -kv | xmllint --format -
Expected behaviour
The valid checksum should be returned
Actual behaviour
Checksum property is returned empty in webdav response
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/core/remote.php/dav/files/test123/Shares/lorem.txt</d:href>
<d:propstat>
<d:prop>
<oc:checksums/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus>
Server configuration
Operating system: ubuntu 20.04
Web server: apache 2
Database: mysql Ver 8.0.25-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
PHP version: 7.4
ownCloud version: (see ownCloud admin page) git master
Updated from an older ownCloud or fresh install:
Where did you install ownCloud from: git
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
Reproduce the overwrite and PROPFIND requests shown in the issue against the WebDAV endpoint, then trace how checksum properties are handled for files in the configured Shares folder. Done means the PROPFIND response returns the valid checksum instead of an empty property with HTTP 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100