-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Nextcloud update cause encryption files not opened anymore or being encrypted. #2206
Comments
I did a little experiment to decrypt files:
Then I supposed that my configuration is somehow broken and I try to recover an encrypted a file (on NC 10):
not sure if necessary, but I did it anyway:
Then I run a Unfortunately after login it is shown that: In owncloud 7.0 I could encrypt files. @schiessle what can I do to decrypt a file when I have the file and it's keyfiles. |
Ok, the |
@tflidd from Nextcloud 9 on you need to restore the database as well. To improve the security, we sign every encrypted file. For this we use a "version" which is stored in the encryption column of the file cache table. If you only restore your files and than rescan your filesystem the version information will no longer be correct and therefore the signature check will fail. If this is the only way to restore the files you could disable the signature check in the code. But this way you will not detect if a attacker has modified your files. |
@schiessle : I did try to work around it a bit further. I replaced this line (https://github.com/nextcloud/server/blob/stable10/apps/encryption/lib/Crypto/Crypt.php#L482) by After that, I got a
There is only the file |
@schiessle: i have the same problem. how can I disable the signature check in the code? Tank you for a short feedback |
Any update on this? |
Anyone? |
same exact issue |
same problem with nextcloud 11.0.3 i also tired it with "$signature = $expectedSignature;" but now i get this error message: Encryption library: Decryption (symmetric) of content failed: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length |
Don't know if it's the same error, but just activated encryption on a customers cloud, and now all the files that are shared can't be accessed. I tried to reshare as well, didn't help. Opening PDFs I get this: Though the owner of the file (admin) can open it without any issues. So is Encryption broken when sharing, or am I doing something wrong? Steps to reproduce
|
@enoch85 did you managed to fix the issue you had? I'm having the same problem currently. |
@almet No, I didn't even remember I posted here tbh. Sorry. |
can't reproduce it. Feel free to re-open if this is still an issue with the latest version of Nextcloud |
@schiessle deactivating the signature check should be a command line option of occ in my opinion. How can I deactivate it? 10.000 of my files have a malformed signature and can't be accessed and/or decrypted due to the signature. |
@suntorytimed @schiessle If you're still stuck in this situation where you can't decrypt files due to a malformed signature, @yahesh has just created a set of tools to help with repairing signatures and decrypting files: https://github.com/syseleven/nextcloud-tools |
Steps to reproduce
1.Login as user
2.User can navigate through his uploaded files
3.User is capable of open or download his files
Expected behaviour
Tell us what should happen
Files should open or download without any problem
Actual behaviour
Tell us what happens instead
Files can't download or open because are encrypted, so when the user is trying to download the, the browser is acting like you are trying to download via local.
In other hand when user tries to open the files, browser redirect with error message "File not found" and url doesn't seems like normaly "[domainname]/apps/files/?dir=/[DirectoryName]/[FileName]&fileid=26" but something like this "[domainname]/remote.php/webdav/[FileName]" instead.
Server configuration
Operating system:
CentOS 6.8
Web server:
VPS
Database:
MySQL 5.5.52
PHP version:
Ver. 7 (FastCGI)
Nextcloud version: (see Nextcloud admin page)
$OC_Version = array(9,1,1,5);
$OC_VersionString = '10.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array(9,0);
$OC_Build = '2016-09-28T13:31:28+00:00 12ec1d1';
$vendor = 'nextcloud';
Updated from an older Nextcloud/ownCloud or fresh install:
$OC_Version = array(9,1,1,5);
$OC_VersionString = '10.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array(9,0);
$OC_Build = '2016-09-28T13:31:28+00:00 12ec1d1';
$vendor = 'nextcloud';
Where did you install Nextcloud from:
The previous version was downloaded from the official website of nextcloud.
The update, i 'm not sure!
Signing status:
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
NO
Are you using encryption: yes/no
YES
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
NO
Client configuration
Browser:
Mozilla / Chrome
Operating system:
Windows 10
Logs
Web server error log
Web server error log
2016-11-20 01:21:49 Error 37.6.0.230 500 GET /remote.php/webdav/%CE%91%CE%9D%CE%91%CE%9A%CE%9F%CE%99%CE%9D%CE%A9%CE%A3%CE%97.doc HTTP/1.1 Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 9.44 K Apache accessThe text was updated successfully, but these errors were encountered: