Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not decrypt this file #35142

Closed
janholubek opened this issue May 2, 2019 · 2 comments
Closed

Can not decrypt this file #35142

janholubek opened this issue May 2, 2019 · 2 comments

Comments

@janholubek
Copy link

Hi,
two weeks ago we migrated from User Key to Master Key encryption without any error message. Meanwhile we noticed, that about 100 (of ten thousands of) files are corrupted since they can neither be opened in the browser nor be synched. The desktop-client claims: "Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you." (Nope, I'm the owner.)

Is there any possibility to rescue respectively decrypt them? (But please only those 100, the decrypt-all took many hours and we need the ownCloud accessible.)

Server configuration

Operating system: CentOS Linux release 7.6.1810 (Core)
Web server: Apache (on Managed Cloud Service)
Database: MySQL
PHP version: 7.1.28
ownCloud version: 10.0.10.4
Updated from an older ownCloud or fresh install: updated
Where did you install ownCloud from: not sure, was before my time here
Signing status (ownCloud 9.0 and above):

No errors have been found.

ownCloud config report:
https://gist.github.com/janholubek/e694aa200e2cc47f447a50dcf0479387

Are you using external storage, if yes which one: no
Are you using encryption: yes
Are you using an external user-backend, if yes which one: Webdav

Client configuration

Browser: Chrome
Operating system: Windows 10 Pro

Logs

Web server error log

not even sure if I have access, I will ask for it, if necessary

ownCloud log (data/owncloud.log)

several errors like

{"reqId":"21edaf24-0f68-4f7e-8961-603b8127e338","level":4,"time":"2019-04-25T11:11:47+00:00","remoteAddr":"***","user":"***","app":"webdav","method":"GET","url":"\/remote.php\/dav\/files\/***\/***.pdf","message":"Exception: Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.: {\"Exception\":\"OC\\\\Encryption\\\\Exceptions\\\\DecryptionFailedException\",\"Message\":\"Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(454): OCA\\\\Encryption\\\\Crypto\\\\Encryption->decrypt(*** sensitive parameters replaced ***)\\n#1 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(289): OC\\\\Files\\\\Stream\\\\Encryption->readCache()\\n#2 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_read(8192)\\n#3 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/streams\\\/src\\\/Wrapper.php(83): fread(Resource id #108, 8192)\\n#4 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_external\\\/3rdparty\\\/icewind\\\/streams\\\/src\\\/CallbackWrapper.php(91): Icewind\\\\Streams\\\\Wrapper->stream_read(8192)\\n#5 [internal function]: Icewind\\\\Streams\\\\CallbackWrapper->stream_read(8192)\\n#6 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/http\\\/lib\\\/Sapi.php(80): stream_copy_to_stream(Resource id #111, Resource id #113, '1120600')\\n#7 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(498): Sabre\\\\HTTP\\\\Sapi::sendResponse(Object(Sabre\\\\HTTP\\\\Response))\\n#8 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#9 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/lib\\\/Server.php(298): Sabre\\\\DAV\\\\Server->exec()\\n#10 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#11 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/remote.php(165): require_once('\\\/var\\\/www\\\/vhosts...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Encryption.php\",\"Line\":366}"}
{"reqId":"XMGWFxSu8qv83DAkzi9b4wAAAAg","level":4,"time":"2019-04-25T11:12:26+00:00","remoteAddr":"***","user":"***","app":"webdav","method":"DELETE","url":"\/remote.php\/webdav\/***\/***.xlsx","message":"Exception: Encryption library: Decryption (symmetric) of content failed: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length: {\"Exception\":\"OC\\\\Encryption\\\\Exceptions\\\\DecryptionFailedException\",\"Message\":\"Encryption library: Decryption (symmetric) of content failed: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Crypt.php(469): OCA\\\\Encryption\\\\Crypto\\\\Crypt->decrypt(*** sensitive parameters replaced ***)\\n#1 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Encryption.php(369): OCA\\\\Encryption\\\\Crypto\\\\Crypt->symmetricDecryptFileContent('', '\\\\xDD\\\\xDBD\\\\x98\\\\xC4\\\\x04Y\\\\xF8m\\\\xA8\\\\xBB{*.\\\\x0E...', 'AES-128-CFB', 2, 0)\\n#2 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(454): OCA\\\\Encryption\\\\Crypto\\\\Encryption->decrypt(*** sensitive parameters replaced ***)\\n#3 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(289): OC\\\\Files\\\\Stream\\\\Encryption->readCache()\\n#4 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_read(8192)\\n#5 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/legacy\\\/helper.php(298): fread(Resource id #190, 8192)\\n#6 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(783): OC_Helper::streamCopy(Resource id #190, Resource id #200)\\n#7 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(667): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyBetweenStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'files_trashbin\\\/...', false, false)\\n#8 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(554): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'files_trashbin\\\/...')\\n#9 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(554): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'files_trashbin\\\/...')\\n#10 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(952): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files_trashbin\\\/...', 'files_trashbin\\\/...')\\n#11 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(Array)\\n#12 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(991): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'copy')\\n#13 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_trashbin\\\/lib\\\/Trashbin.php(878): OC\\\\Files\\\\View->copy('***\\\/files...', '***\\\/...')\\n#14 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_trashbin\\\/lib\\\/Trashbin.php(226): OCA\\\\Files_Trashbin\\\\Trashbin::copy_recursive('***\\\/files...', '***\\\/...', Object(OC\\\\Files\\\\View))\\n#15 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_trashbin\\\/lib\\\/Trashbin.php(358): OCA\\\\Files_Trashbin\\\\Trashbin::copyFilesToUser('***', '***', '***', '***', 1556190743)\\n#16 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_trashbin\\\/lib\\\/Storage.php(184): OCA\\\\Files_Trashbin\\\\Trashbin::move2trash('***')\\n#17 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/files_trashbin\\\/lib\\\/Storage.php(119): OCA\\\\Files_Trashbin\\\\Storage->doDelete('***', 'unlink')\\n#18 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(1185): OCA\\\\Files_Trashbin\\\\Storage->unlink('***')\\n#19 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(739): OC\\\\Files\\\\View->basicOperation('unlink', '\***', Array)\\n#20 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(Array)\\n#21 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(749): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'delete')\\n#22 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(422): OC\\\\Files\\\\View->unlink('\***')\\n#23 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(179): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->delete()\\n#24 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('***')\\n#25 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#26 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#27 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#28 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#29 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(64): Sabre\\\\DAV\\\\Server->exec()\\n#30 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/remote.php(165): require_once('\\\/var\\\/www\\\/vhosts...')\\n#31 {main}\",\"File\":\"\\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Crypt.php\",\"Line\":587}"}
{"reqId":"XMLMAJBY0VdWtAl69wmKHwAAAAQ","level":4,"time":"2019-04-26T09:14:40+00:00","remoteAddr":"***","user":"***","app":"webdav","method":"MOVE","url":"\/remote.php\/webdav\/***\/***","message":"Exception: \"***" is locked: {\"Exception\":\"OCP\\\\Lock\\\\LockedException\",\"Message\":\"\\\"***" is locked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(819): OC\\\\Files\\\\View->changeLock('***', 2, true)\\n#1 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(Array)\\n#2 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php(884): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'rename')\\n#3 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Node.php(150): OC\\\\Files\\\\View->rename('***', '***')\\n#4 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(151): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Node->setName('***')\\n#5 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(642): Sabre\\\\DAV\\\\Tree->move('***', '***')\\n#6 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMove(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:MOVE', Array)\\n#9 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#10 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(64): Sabre\\\\DAV\\\\Server->exec()\\n#11 \\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/remote.php(165): require_once('\\\/var\\\/www\\\/vhosts...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/vhosts\\\/***.***.de\\\/htdocs\\\/lib\\\/private\\\/Files\\\/View.php\",\"Line\":2021}"}

@PVince81
Copy link
Contributor

PVince81 commented May 6, 2019

@sharidas @cdamken is this a known issue ?

@stale
Copy link

stale bot commented Sep 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants