Repository navigation
When calling file_put_contents clear the checksum - #24098
Conversation
| } | ||
| $this->correctParentStorageMtime($path); | ||
| if ($data['mimetype'] !== 'httpd/unix-directory') { | ||
| $this->clearChecksum($path); |
There was a problem hiding this comment.
okay, I guess there is no easy way to integrate this change in one of the existing database calls.
@icewind1991 or is there a better moment ?
There was a problem hiding this comment.
Well it gets kind of messy trying to cram this into the scan call I think
There was a problem hiding this comment.
I think it would make sense in general to clear the checksum in the scanner if it detects a change
There was a problem hiding this comment.
@icewind1991 This will likely be needed too for the other issue #23783 but would it also cover the text editor / file_put_contents issue too ?
There was a problem hiding this comment.
scanFile indeed might be a good place...
|
Moved the check to the scanFile. Patch is simpler and cleaner. @PVince81 @icewind1991 please have another look. |
|
Code looks good 👍 |
|
@karlitschek we should backport this to 9.0.2 |
|
great. fix makes sense. please backport to stable9 |
|
Looks good 👍 |
|
@rullzer can you prepare the backport PR ? |
|
Backport in #24129 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #23782 and #23783
If a file is changed we should reset the checksum.
To test:
curl -u admin:admin http://localhost/master/remote.php/webdav/foo.txt -X PUT -T foo.txt -H "OC-Checksum: foobar"Test 2:
curl -u admin:admin http://localhost/master/remote.php/webdav/foo.txt -X PUT -T foo.txt -H "OC-Checksum: foobar"./occ files:scan adminCC: @PVince81 @nickvergessen @MorrisJobke @dragotin