Cannot use shared encrypted libraries (api returns wrong values)

Hi all,
I cannot make use uf shared libraries, when they are encrypted.

To reproduce:

  1. User 2 creates a encrypted library
  2. User 2 shares the encrypted library
  3. User 2 can work with the library
  4. User 1 cannot access the encrypted library (except in the web client) because it looks like it is not encrypted + there is no prompt for a password (see the screenshots. There is no lock for the shared liraries in the client of user A but they are there for user B, who is the owner of the libraries)
    userA

I did some debugging and found out, that the response to the /api2/repos/ call returns wrong encrypted value for user 1(false instead of true). A call to /api/v2.1/admin/libraries returns the correct values (see log at the end of this post). In the logfile Test encrypted should be encrypted Test normal is a not encrypted shared library, Dokumente is a encrypted library owned by user 1.
Can somebody please help me with this?

What I tried already

  • Create the shared library with the other user
  • Use sqlite instead of mysql
  • complete new installation of seafile

My installation

  • Seafile 6.3.1 on a raspberry pi 3b with mysql
  • nginx with https as reverse proxy

api log
I changed the names and e-mails to user1 and user2
/api2/repos/

[
{
“root”: “”,
“modifier_email”: null,
“name”: “Dokumente”,
“permission”: “rw”,
“size_formatted”: “7,6 MB”,
“virtual”: false,
“mtime_relative”: “<time datetime="2018-07-25T09:57:10" is="relative-time" title="Mi, 25 Jul 2018 09:57:10 +0000" >vor 2 Tagen”,
“head_commit_id”: “7df9b133ee740f4c94b09c5b7565d1d7138591c2”,
“encrypted”: true,
“version”: 1,
“mtime”: 1532512630,
“owner”: “user1@mail. com”,
“modifier_contact_email”: “”,
“type”: “repo”,
“id”: “cb2f5dac-33b5-44d0-93fa-4be5d273a4e7”,
“modifier_name”: “”,
“size”: 8020000
},

{
“owner_nickname”: “user2”,
“modifier_email”: null,
“name”: “Test normal”,
“share_type”: “personal”,
“permission”: “rw”,
“size_formatted”: “293,5 KB”,
“root”: “”,
“mtime_relative”: “<time datetime="2018-05-30T11:30:28" is="relative-time" title="Mi, 30 Mai 2018 11:30:28 +0000" >2018-05-30”,
“is_admin”: false,
“head_commit_id”: “bad8ffb738d91b9de210966d37587754e33e8724”,
“encrypted”: false,
“version”: 0,
“mtime”: 1527679828,
“owner”: “user2@mail. com”,
“modifier_contact_email”: “”,
“type”: “srepo”,
“id”: “b344ab7f-4b97-48c1-9d3b-38dcf91eee7e”,
“modifier_name”: “”,
“size”: 300544
},
{
“owner_nickname”: “user2”,
“modifier_email”: null,
“name”: “Test encrypted”,
“share_type”: “personal”,
“permission”: “rw”,
“size_formatted”: “0 Bytes”,
“root”: “”,
“mtime_relative”: “<time datetime="2018-05-04T12:48:57" is="relative-time" title="Fr, 4 Mai 2018 12:48:57 +0000" >2018-05-04”,
“is_admin”: false,
“head_commit_id”: “9a0ccb42c3b89f106e8901b7c379d624200db6fc”,
“encrypted”: false,
“version”: 0,
“mtime”: 1525438137,
“owner”: “user2@mail. com”,
“modifier_contact_email”: “”,
“type”: “srepo”,
“id”: “26ad1efc-86b3-42d9-9a11-62a56946230f”,
“modifier_name”: “”,
“size”: 0
}
]

/api/v2.1/admin/libraries

{
“page_info”: {
“current_page”: 1,
“has_next_page”: false
},
“repos”: [

{
“owner_contact_email”: “user2@mail. com”,
“owner_name”: “user2”,
“name”: “Test encrypted”,
“encrypted”: true,
“owner_email”: “user2@mail. com”,
“file_count”: 1,
“owner”: “user2@mail. com”,
“size_formatted”: “0 Bytes”,
“id”: “26ad1efc-86b3-42d9-9a11-62a56946230f”,
“size”: 0
},

{
“owner_contact_email”: “user2@mail .com”,
“owner_name”: “user2”,
“name”: “Test normal”,
“encrypted”: false,
“owner_email”: “user2@mail. com”,
“file_count”: 1,
“owner”: “user2@mail. com”,
“size_formatted”: “293,5 KB”,
“id”: “b344ab7f-4b97-48c1-9d3b-38dcf91eee7e”,
“size”: 300544
},

{
“owner_contact_email”: “user1@mail .com”,
“owner_name”: “user1”,
“name”: “Dokumente”,
“encrypted”: true,
“owner_email”: “user1@mail. com”,
“file_count”: 31,
“owner”: “user1@mail. com”,
“size_formatted”: “7,6 MB”,
“id”: “cb2f5dac-33b5-44d0-93fa-4be5d273a4e7”,
“size”: 8020000
}
]
}

The same problem has already been reported here: Strange behaviour with encrypted libraries
Interesting discovery with the wrong return values via the API. I think this will help @daniel.pan locate and fix the problem. By the way which client version do you use?

Thank you.
I did not see the other thread. It lokks like this is the same issue. Can somebody merge this thread into the other one?

I use:

  • Windows client 6.1.8
  • Android client 2.2.1

The windows client crashes, when I try to download the library see here: https://github.com/haiwen/seafile/issues/2046
With Android I can browse the files but not open them.

Please tell me, if there is something I can do in order to find the issue.