Skip to content

Encrypted external WebDAV storage not working in NC 13.0.3, OCP\Encryption\Exceptions\GenericEncryptionException: Missing Signature #9792

@lje

Description

@lje

Steps to reproduce

  1. Enable server side encryption module (Default encryption module)
  2. Leave all settings at default (external storage encrypted, local storage not encrypted)
  3. Mount an external WebDAV folder using a normal user, allow sharing for that folder. In my example WebDAV provider is https://webdav.magentacloud.de/

Expected behaviour

Folder should work

Actual behaviour

Upload to the remote folder works, download doesnt work. NC's Error log has lot of entries stating
OCP\Encryption\Exceptions\GenericEncryptionException: Missing Signature (complete error message will be at the end)
Looking directly at the WebDAV storage (using an WebDAV client) reveals that the file was uploaded successfully and is encrypted, but there are no hidden signature files

Server configuration

Operating system:
Linux 2.6.32 x86_64

Web server:
Apache 2.2

Database:
MySQL 5.1.73

PHP version:
7.0.29

Nextcloud version: (see Nextcloud admin page)
13.0.3 (same issue with 13.0.2)

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 12.x

Where did you install Nextcloud from:
Web based installer https://download.nextcloud.com/server/installer/setup-nextcloud.php

Signing status:

No errors have been found.
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

All default + encryption module
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

No sudo (shared host)

Detailled error message:
OCP\Encryption\Exceptions\GenericEncryptionException: Missing Signature

/var/www/virtual/<path>/apps/encryption/lib/Crypto/Crypt.php - line 529: OCA\Encryption\Crypto\Crypt->hasSignature('---------------...', 'AES-256-CTR')
/var/www/virtual/<path>/apps/encryption/lib/Crypto/Crypt.php - line 462: OCA\Encryption\Crypto\Crypt->splitMetaData('---------------...', 'AES-256-CTR')
/var/www/virtual/<path>/apps/encryption/lib/Crypto/Encryption.php - line 380: OCA\Encryption\Crypto\Crypt->symmetricDecryptFileContent('---------------...', 'D\x08!\x8E\x99\x99$\x08`fw\xA8\xDF\xA0H...', 'AES-256-CTR', 1, 0)
/var/www/virtual/<path>/lib/private/Files/Stream/Encryption.php - line 464: OCA\Encryption\Crypto\Encryption->decrypt(*** sensitive parameters replaced ***)
/var/www/virtual/<path>/lib/private/Files/Stream/Encryption.php - line 295: OC\Files\Stream\Encryption->readCache()
[internal function] OC\Files\Stream\Encryption->stream_read(8192)
/var/www/virtual/<path>/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php - line 83: fread(Resource id #55, 8192)
/var/www/virtual/<path>/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php - line 91: Icewind\Streams\Wrapper->stream_read(8192)
[internal function] Icewind\Streams\CallbackWrapper->stream_read(8192)
/var/www/virtual/<path>/3rdparty/sabre/http/lib/Sapi.php - line 80: stream_copy_to_stream(Resource id #58, Resource id #59, '5961980')
/var/www/virtual/<path>/3rdparty/sabre/dav/lib/DAV/Server.php - line 498: Sabre\HTTP\Sapi sendResponse(Object(Sabre\HTTP\Response))
/var/www/virtual/<path>/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/virtual/<path>/apps/dav/lib/Server.php - line 287: Sabre\DAV\Server->exec()
/var/www/virtual/<path>/apps/dav/appinfo/v2/remote.php - line 35: OCA\DAV\Server->exec()
/var/www/virtual/<path>/remote.php - line 164: require_once('/var/www/virtua...')
{main}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions