core icon indicating copy to clipboard operation
core copied to clipboard

Shared files are not decrypted

Open salva86 opened this issue 13 years ago • 8 comments

Expected behaviour

When sharing files to other users the file is decrypted

Actual behaviour

When sharing files to other users the file is encrypted

Steps to reproduce

Logon with a user encrypt a file and share it with a group. log in with another user download the shared file - the file is still encrytped.

Log

Error

Encryption library

Decryption (asymmetric) of sealed content with share-key "" failed

2013-09-25T08:27:59+00:00

Error

Encryption library

Decryption (asymmetric) of sealed content with share-key "" failed

2013-09-25T08:28:33+00:00

Error

Encryption library

Decryption (asymmetric) of sealed content with share-key "" failed

2013-09-25T08:29:04+00:00

Warning

Encryption library

Sharing to these user(s) failed as they are unready for encryption:"Array ( [0] => A8928D60-789F-44BC-AFCD-2BA8405BEECF )

2013-09-25T08:26:29+00:00

Warning

Encryption library

"A8928D60-789F-44BC-AFCD-2BA8405BEECF" is not setup for encryption

2013-09-25T08:26:29+00:00

Server configuration

Operating system: Windows Server 2008 R2

Web server: IIS

Database: MySQL

PHP version: 5.4.19

ownCloud version:5.0.11

I have tried to delete all Cookies before logging in with another user. also unselected the checkbox "remember passwort".

salva86 avatar Sep 25 '13 08:09 salva86

@schiesbn @ringmaster THX

DeepDiver1975 avatar Sep 25 '13 09:09 DeepDiver1975

It looks like the user ""A8928D60-789F-44BC-AFCD-2BA8405BEECF" doesn't have a key-pair yet. Every user needs to log-in at least once after the encryption app was enabled.

If you share the file after the encryption app was enabled ownCloud should detect that not all users are ready and prompt an error message in the web interface. If the file was already shared before, that there is nothing we can do about it.

Can you try it once more after all users from the group logged-in at least once, to make sure that it is not a general problem but the problem I described above?

If you were able to share to the group without getting a error message, even if not everyone has a key-pair than this is probably a windows-only issue... @ringmaster would be great if you could have a look at it.

schiessle avatar Sep 25 '13 10:09 schiessle

I have tried logging the user in and out again. i have created a new user didnt work also. sharing works i can see the files, but like i said, they are encrypted (new files and old files). the files from "A8928D60-789F-44BC-AFCD-2BA8405BEECF" are encrypted and everything works - just the shared ones dont...

every user has to be logged in and out? when i check my database i have old guids from old ldap users. the database doesnt delete these. do i have to delete these manually? maybe the encryption app "waits" until these users are logged in??? the users arent unter "users" in the owncloud web interface or in the active directory group!

salva86 avatar Sep 25 '13 11:09 salva86

@schiesbn Is this still open?

karlitschek avatar Oct 24 '13 10:10 karlitschek

I can't reproduce it and the error message is quite clear ("A8928D60-789F-44BC-AFCD-2BA8405BEECF" is not setup for encryption). If the user isn't set-up for encryption than the file can't be encrypted/decrypted to him.

Solution:

  • Make sure that the user is set-up correctly: log-in as the user
  • Than unshare the file and share it again

schiessle avatar Oct 24 '13 12:10 schiessle

The test for this is still failing under Windows. I don't know yet if it's because of the test (incorrectly setting up encryption for a user) or because of the code. Though if it's not possible to reproduce manually, I suspect the test is simply fragile. There seem to be some instances in the tests where simple things can cause exceptions that halt the test but leave it in an inconsistent state that ruins subsequent tests. Not sure if/how that affects Jenkins, but for repeated local testing, it's extremely bothersome. Regardless, the test for this still fails under Windows and is something I've been looking into (among other Windows encryption test failures) for the past couple days.

ringmaster avatar Oct 24 '13 12:10 ringmaster

@karlitschek @ringmaster @schiesbn as long as we are still facing generall issues with encryption on linux backends it might be a valid approach to NOT allow encryption on Windows Servers for OC6 - objections?

That could be a time saver for the oc6 release

DeepDiver1975 avatar Oct 24 '13 12:10 DeepDiver1975

Actually we have to fix it. Sorry. @ringmaster Can you help please?

karlitschek avatar Oct 24 '13 13:10 karlitschek