-
-
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
OC\HintException: Bad Signature #3222
Comments
cc @schiessle for the encryption app. |
I have identified the file that was creating this error. This document was uploaded on a shared folder by a user who was not the owner of teh folder. This user has not enebled the password recovery. It seems that nextcloud has used the password of this user to encrypt the file and the password of the owner ot the folder to decrypt it. |
Hi,
I have tested the "occ decryp-all" and I have found the same behavior: a couple of files (with same name) for the same file, only for files owned of user [B]. I watched them from Google Drive. I have tryed to delete from Drive the crypted version of each files of user [B] and, after that, the decrypted file appears on the web interface and on the client. |
having this issue as well |
Nextcloud 11.0.3 |
The same happens with a password protected link: |
Same here with password protected shared link. |
Same here with a shared link (without password protection). |
Same, but nothing was shared because sharing in any form is disabled: /var/www/html/nextcloud/apps/encryption/lib/Crypto/Crypt.php - line 464: OCA\Encryption\Crypto\Crypt->checkSignature('IEHNkPQ4+YcsaoA...', ',\xA7\xA2q\xEB\xBC8F\xA6\x07\xA7#J\xA6B...', 'cdf4e80a847cf79...') |
Carp, I ran into exactly that same issue :-( |
Me too. Just sent a public link to a friend so that he could upload a file. The file is shown on the server but cannot be opened. Encryption is enabled. |
Here also. I also sent a public link for a friend to upload some files. He did upload them, but I cannot access them. I sent the link using latest nextcloud dev android client from F-Droid. Just before sending the link, I created a folder into which he could upload the files. Now I only see the newly created folder with my android client, but I do not see the content. If I login via browser, I cannot see the folder nor the files. Also desktop sync fails. I have Nextcloud 11.0.3 (stable), running on Linux Mint 17.3. I'm using Nginx. |
Same here with Nextcloud 11.0.3 Debian 8 Encryption is enabled! Is this bug fixed in Nextcloud12 ? |
Same here. We are using an encrypted Nextcloud instance 11.0.3. Steps to reproduce: Log entry: |
@MorrisJobke @schiessle UPDATE: |
@js94x thanks for your Update! I have updated to Nextcloud 12 and the bug is fixed in nc12. |
We had two fixes with encryption regarding public links:
both where backported to stable11 and released with Nextcloud 11. If you still have the problem with Nextcloud 11 I need a detailed description:
If I have this information I can try to reproduce it and see if we missed a backport. |
@schiessle As for me it was a normal link share with permissions set to upload only. But how do I know if I am using a master key, sorry? |
@mrkskwsnck you don't use the master key if you just enabled it in the admin settings and the "default encryption app". The master key needs to be enabled with occ: ./occ encryption:enable-master-key What Nextcloud version do you use? |
@schiessle I am running the Nextcloud Box with a set up Nextcloud as snap with version 11.0.3 because there still is no NC12 snap available. In fact I set up encryption using the default encryption module without setting an explicit master key. |
Nextcloud 11.0.3 (stable) |
@schiessle: The download seems to be successful, but the file content is invalid. There is a html page with error message 'Bad Signature'. Hope you can reproduce it. |
OK, I found two issues. One is that we don't encrypt the file with the recovery key, this will be fixed here: #5629 But the real reason why you can't read the file uploaded via a public link is because we write in the file cache "0" to the "encrypted" column while "1" would be the right value. The strange thing is that we execute the exact same code path like we did for uploads done by a logged in user and there it works. This is the point in the code where we set "encrypted" to "1" after the upload: https://github.com/nextcloud/server/blob/stable11/apps/encryption/lib/KeyManager.php#L464 But for some reasons at the end "0" is stored at the file cache. The complete code path within encryption didn't changed between stable11, stable12 and master. But the problem only appears with stable11. @icewind1991 are you aware of any change on the file cache which could have solved the problem for Nextcloud >11? Anything we could backport? Maybe you can have a look, Thanks! |
Closed as this is fixed for Nextcloud >=12 and Nextcloud 11 is no longer supported |
Steps to reproduce
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
Server configuration
Operating system:
debian plus docker wonderfall/nextcloud
Web server:
nginx (official docker)
Database:
postgres (official docker)
PHP version:
7.0.14
Nextcloud version: (see Nextcloud admin page)
11.0.1
Updated from an older Nextcloud/ownCloud or fresh install:
Bug was present on version 11.0. Update made via new pull of the docker image
Where did you install Nextcloud from:
docker
Signing status:
Signing status
List of activated apps:
App list
The content of config/config.php:
Config report
Are you using external storage, if yes which one: local/smb/sftp/...
NO
Are you using encryption: yes/no
YES at the beggining, then I have tried to stop it, but the Fatal Error still happen during the synch
(command made to stop encryption :
occ maintenance:singleuser --on
occ encryption:decrypt-all
occ maintenance:singleuser --off)
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
NO
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser:
Chrome 55.0.2883.87
Operating system:
Windows 10
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log
The text was updated successfully, but these errors were encountered: