Error when comparing a file checksum synchronized to SMB

Hello,
I would like to ask for advice to solve a problem:
When synchronizing new files to external SMB storage via OC client, I get the error “The computed checksum does not match the one received from the client.”.

  • The problem only occurs when synchronizing via OC client to external storage (NetApp, WinSrv2019)
  • The same problem occurs on a new installation
  • Via the web interface, the file upload is fine
  • In the function isChecksumValid in the file /apps/dav/lib/Connector/Sabre/File.php:653 there is isset(false) if I add “|| empty()” to the test the synchronization goes without problem

I have checked the database table oc_filecache and it does not contain checksums for external storage. So I want to ask if this behavior is OK and possibly where the problem could be.

OC 10.12.1.3 is running on openSUSE 15.4, Apache/2.4.51 prefork, PHP 7.4.33

Thank you in advance for any help.

It’s definitely not the best solution, but as a temporary solution this modification helped me:

./lib/private/Files/Stream/Checksum.php

public function stream_close()

@@ -189,7 +189,7 @@ class Checksum extends Wrapper {
-               if ($this->fromBeginning && (!$this->reading || parent::stream_eof())) {
+               if ($this->fromBeginning && (!$this->reading || parent::stream_eof()) || !defined(parent::stream_eof())) {