Skip to content

Bad Signature with specific files #7287

@jask05

Description

@jask05

Steps to reproduce

I don't know how to reproduce but I tell you what I have.

  1. Folder (Nextcloud): /Carpetas/Málaga/Para entregar/
  2. Files: "Pleno Extraordinario 08-11-17 (Eva).docx" and "Comisión Transparencia 02-11-17 (Eva).docx"

If I click either this two files I've get HTTP error 503. These files are upload by a user in a shared folder and this user is not the owner of this folder.

Expected behaviour

It should download these files.

Actual behaviour

HTTP error 503
This site can’t be reached

The webpage at https://website.com/remote.php/webdav/Carpeta/Málaga/Para%20entregar/Pleno%20Extraordinario%2008-11-17%20(Eva).docx might be temporarily down or it may have moved permanently to a new web address. ER,INVALID_RESPONSE

Server configuration

Operating system: Ubuntu 16.04
Web server: Apache 2.4.18
Database: MySQL 14.14
PHP version: 7.0.22
ownCloud version: 12.0.3
Updated from an older ownCloud or fresh install: fresh install
Where did you install ownCloud from: zip file
Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
    "system": {
        "instanceid": "ocm54qlwn5ys",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.1.55",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/mnt\/nextdata\/data",
        "overwrite.cli.url": "https:\/\/xxxx.xxxx.com",
        "dbtype": "mysql",
        "version": "12.0.3.3",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "php",
        "mail_smtpauthtype": "LOGIN",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "session_lifetime": 86400,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "log_rotate_size": "20971520",
        "logdateformat": "F d, Y H:i:s",
        "cron_log": true,
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated apps:

Enabled:
  - activity: 2.5.2
  - admin_audit: 1.2.0
  - admin_notifications: 1.0.1
  - bruteforcesettings: 1.0.2
  - checksum: 0.3.5
  - comments: 1.2.0
  - dav: 1.3.0
  - encryption: 1.6.0
  - federatedfilesharing: 1.2.0
  - federation: 1.2.0
  - files: 1.7.2
  - files_automatedtagging: 1.2.2
  - files_pdfviewer: 1.1.1
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.1
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - password_policy: 1.2.2
  - provisioning_api: 1.2.0
  - quota_warning: 1.1.1
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - tasks: 0.9.5
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - updatenotification: 1.2.0
  - workflowengine: 1.2.0
Disabled:
  - files_accesscontrol
  - files_external
  - gallery
  - onlyoffice
  - sensorlogger
  - user_external
  - user_ldap

Are you using external storage, if yes which one: No
Are you using encryption: yes/no => I've used it but it’s disabled right now.
Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Chrome and Firefox (last version)
Operating system: Mac Os X and WIndows 10

Logs

Web server error log

PHP Uncaught Error: Access to undeclared static property: OC\Files\Filesystem::$normalizedPathCache in /var/www/nextcloud/lib/private/Files/Filesystem.php:804 Stack trace: #0 /var/www/nextcloud/lib/private/Files/View.php(2032): OC\Files\Filesystem::normalizePath(’/XXXXX/files…’) #1 /var/www/nextcloud/lib/private/Files/View.php(1170): OC\Files\View->unlockFile(’/Carpeta/M\xC3…’, 1) #2 [internal function]: OC\Files\View->OC\Files{closure}() #3 /var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php(109): call_user_func(Object(Closure)) #4 [internal function]: Icewind\Streams\CallbackWrapper->stream_close() #5 {main} thrown at /var/www/nextcloud/lib/private/Files/Filesystem.php#804
WebDav OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature
/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php - line 463: OCA\Encryption\Crypto\Crypt->checkSignature(‘3Sh0/LqVKJFyIOL…’, ‘\xEC\x85h \xE8\xB4"8U\xA47\xF0\xC6r\x17…’, ‘c63f07173d8d63f…’)
/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php - line 378: OCA\Encryption\Crypto\Crypt->symmetricDecryptFileContent(‘3Sh0/LqVKJFyIOL…’, ‘\xEC\x85h \xE8\xB4"8U\xA47\xF0\xC6r\x17…’, ‘AES-256-CTR’, 2, 0)
/var/www/nextcloud/lib/private/Files/Stream/Encryption.php - line 460: OCA\Encryption\Crypto\Encryption->decrypt(*** sensitive parameters replaced ***)
/var/www/nextcloud/lib/private/Files/Stream/Encryption.php - line 291: OC\Files\Stream\Encryption->readCache()
[internal function] OC\Files\Stream\Encryption->stream_read(8192)
/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php - line 83: fread(Resource id #40, 8192)
/var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php - line 91: Icewind\Streams\Wrapper->stream_read(8192)
[internal function] Icewind\Streams\CallbackWrapper->stream_read(8192)
/var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php - line 78: stream_copy_to_stream(Resource id #43, Resource id #45, ‘44920’)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 498: Sabre\HTTP\Sapi sendResponse(Object(Sabre\HTTP\Response))
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 71: Sabre\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 162: require_once(’/var/www/nextcl…’)
{main}

ownCloud log (data/owncloud.log)

{“reqId”:“FyRyFWj6vYV9tsAZYG3p”,“level”:1,“time”:“November 22, 2017 19:05:11”,“remoteAddr”:“XX.XX.XX.XX”,“user”:“XXXXX”,“app”:“admin_audit”,“method”:“GET”,“url”:"/remote.php/webdav/Carpeta/M%C3%A1laga/Para%20entregar/Pleno%20Extraordinario%2008-11-17%20(Eva).docx",“message”:“File accessed: “/Carpeta/M\u00e1laga/Para entregar/Pleno Extraordinario 08-11-17 (Eva).docx””,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36”,“version”:“12.0.2.0”}
{“reqId”:“FyRyFWj6vYV9tsAZYG3p”,“level”:4,“time”:“November 22, 2017 19:05:11”,“remoteAddr”:“XX.XX.XX.XX”,“user”:“XXXXXX”,“app”:“webdav”,“method”:“GET”,“url”:"/remote.php/webdav/Carpeta/M%C3%A1laga/Para%20entregar/Pleno%20Extraordinario%2008-11-17%20(Eva).docx",“message”:“Exception: {“Exception”:“OCP\\Encryption\\Exceptions\\GenericEncryptionException”,“Message”:“Bad Signature”,“Code”:0,“Trace”:”#0 \/var\/www\/nextcloud\/apps\/encryption\/lib\/Crypto\/Crypt.php(463): OCA\\Encryption\\Crypto\\Crypt->checkSignature(‘3Sh0\/LqVKJFyIOL…’, ‘\\xEC\\x85h:\\xE8\\xB4\"8U\\xA47\\xF0\\xC6r\\x17…’, ‘c63f07173d8d63f…’)\n#1 \/var\/www\/nextcloud\/apps\/encryption\/lib\/Crypto\/Encryption.php(378): OCA\\Encryption\\Crypto\\Crypt->symmetricDecryptFileContent(‘3Sh0\/LqVKJFyIOL…’, ‘\\xEC\\x85h:\\xE8\\xB4\"8U\\xA47\\xF0\\xC6r\\x17…’, ‘AES-256-CTR’, 2, 0)\n#2 \/var\/www\/nextcloud\/lib\/private\/Files\/Stream\/Encryption.php(460): OCA\\Encryption\\Crypto\\Encryption->decrypt(*** sensitive parameters replaced ***)\n#3 \/var\/www\/nextcloud\/lib\/private\/Files\/Stream\/Encryption.php(291): OC\\Files\\Stream\\Encryption->readCache()\n#4 [internal function]: OC\\Files\\Stream\\Encryption->stream_read(8192)\n#5 \/var\/www\/nextcloud\/3rdparty\/icewind\/streams\/src\/Wrapper.php(83): fread(Resource id #40, 8192)\n#6 \/var\/www\/nextcloud\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(91): Icewind\\Streams\\Wrapper->stream_read(8192)\n#7 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_read(8192)\n#8 \/var\/www\/nextcloud\/3rdparty\/sabre\/http\/lib\/Sapi.php(78): stream_copy_to_stream(Resource id #43, Resource id #45, ‘44920’)\n#9 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(498): Sabre\\HTTP\\Sapi::sendResponse(Object(Sabre\\HTTP\\Response))\n#10 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#11 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(71): Sabre\\DAV\\Server->exec()\n#12 \/var\/www\/nextcloud\/remote.php(162): require_once(’\/var\/www\/nextcl…’)\n#13 {main}",“File”:"\/var\/www\/nextcloud\/apps\/encryption\/lib\/Crypto\/Crypt.php",“Line”:483}",“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36”,“version”:“12.0.2.0”}

Summary

When I try to download specific files in a specific folder (with blank spaces and accents in their names) I get HTTP 503 error. These files exists in the server (physical). This is a shared folder and its owner is different than owner of the files.
I activated encryption module but I've disabled it because I got "bad data signature" error in Nextcloud web log. I thought that the problem was there but with encryption disabled it continue.

Also I could check when I get a file CPU load change from 0-2% to 80-90%.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions