{"action":"created","issue":{"url":"https://api.github.com/repos/haiwen/seadroid/issues/537","repository_url":"https://api.github.com/repos/haiwen/seadroid","labels_url":"https://api.github.com/repos/haiwen/seadroid/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/haiwen/seadroid/issues/537/comments","events_url":"https://api.github.com/repos/haiwen/seadroid/issues/537/events","html_url":"https://github.com/haiwen/seadroid/issues/537","id":159846033,"number":537,"title":"Cannot download files from encrypted library with client encryption enabled","user":{"login":"nidomiro","id":15079172,"avatar_url":"https://avatars.githubusercontent.com/u/15079172?v=3","gravatar_id":"","url":"https://api.github.com/users/nidomiro","html_url":"https://github.com/nidomiro","followers_url":"https://api.github.com/users/nidomiro/followers","following_url":"https://api.github.com/users/nidomiro/following{/other_user}","gists_url":"https://api.github.com/users/nidomiro/gists{/gist_id}","starred_url":"https://api.github.com/users/nidomiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidomiro/subscriptions","organizations_url":"https://api.github.com/users/nidomiro/orgs","repos_url":"https://api.github.com/users/nidomiro/repos","events_url":"https://api.github.com/users/nidomiro/events{/privacy}","received_events_url":"https://api.github.com/users/nidomiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/haiwen/seadroid/milestones/18","html_url":"https://github.com/haiwen/seadroid/milestones/2.1.0","labels_url":"https://api.github.com/repos/haiwen/seadroid/milestones/18/labels","id":1584743,"number":18,"title":"2.1.0","description":"","creator":{"login":"Logan676","id":2975850,"avatar_url":"https://avatars.githubusercontent.com/u/2975850?v=3","gravatar_id":"","url":"https://api.github.com/users/Logan676","html_url":"https://github.com/Logan676","followers_url":"https://api.github.com/users/Logan676/followers","following_url":"https://api.github.com/users/Logan676/following{/other_user}","gists_url":"https://api.github.com/users/Logan676/gists{/gist_id}","starred_url":"https://api.github.com/users/Logan676/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Logan676/subscriptions","organizations_url":"https://api.github.com/users/Logan676/orgs","repos_url":"https://api.github.com/users/Logan676/repos","events_url":"https://api.github.com/users/Logan676/events{/privacy}","received_events_url":"https://api.github.com/users/Logan676/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":11,"state":"open","created_at":"2016-02-16T04:08:20Z","updated_at":"2016-06-14T07:28:52Z","due_on":"2016-07-15T16:00:00Z","closed_at":null},"comments":6,"created_at":"2016-06-12T20:29:31Z","updated_at":"2016-06-14T17:39:56Z","closed_at":"2016-06-14T07:28:52Z","body":"Everything is tested with an encrypted library on the (selfhosted) server.\r\nIf I disable clientside encryption, everything works as expected.\r\nWith clientside encryption enabled downloading an existing file fails with the messages (translated) \"Download failed\" followed by \" The file \"<filename>\" has been deleted.\r\nCreating an file through the app and uploading an existing file works fine. If I upload an existing txt-file containing \"test\", results in an file containing the word \"test\" followed by the null-character until an filesize of 2k is reached.\r\nDownloading the file created through the app immediately after creation results in an crash of seafile.\r\nDeleting the uploaded file inside the \"Android/media/com.seafile.seadroid2/<accountname>/<Libname>/\" folder and trying to download it again results in the same errors mentioned before.\r\n\r\n\r\n\r\n\r\nDevice: Galaxy S5\r\nAndroid version: 5.0.1\r\nSeadroid version: 2.1.0 ( [from here](https://github.com/haiwen/seadroid/issues/534#issuecomment-224305772) )\r\nReproducible: every time"},"comment":{"url":"https://api.github.com/repos/haiwen/seadroid/issues/comments/225958209","html_url":"https://github.com/haiwen/seadroid/issues/537#issuecomment-225958209","issue_url":"https://api.github.com/repos/haiwen/seadroid/issues/537","id":225958209,"user":{"login":"nidomiro","id":15079172,"avatar_url":"https://avatars.githubusercontent.com/u/15079172?v=3","gravatar_id":"","url":"https://api.github.com/users/nidomiro","html_url":"https://github.com/nidomiro","followers_url":"https://api.github.com/users/nidomiro/followers","following_url":"https://api.github.com/users/nidomiro/following{/other_user}","gists_url":"https://api.github.com/users/nidomiro/gists{/gist_id}","starred_url":"https://api.github.com/users/nidomiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidomiro/subscriptions","organizations_url":"https://api.github.com/users/nidomiro/orgs","repos_url":"https://api.github.com/users/nidomiro/repos","events_url":"https://api.github.com/users/nidomiro/events{/privacy}","received_events_url":"https://api.github.com/users/nidomiro/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T17:39:56Z","updated_at":"2016-06-14T17:39:56Z","body":"So, with the server version 5.1.3 it's working nearly as expected ;)\r\nThe bug with the `null-characters` still exists.\r\nSteps to reproduce:\r\nAndroid App: client-side encryption enabled\r\n1. Create an textfile with the content `test` through the app in an encrypted library\r\n2. Let it sync to your PC (in my case Win 7 and client-version 5.1.2)\r\n3. Open the file with an editor, which can display \"unreadable\" files (in my case notepad++) or simply an Hex-Editor. There you see the word `test `followed by many `null-caracters` (in hex `74 65 73 74 ` followed by `00` until address `0x001FFFFF`)\r\n\r\nYou get the same result if you create the file on the PC, download it with the app and view the file on the phone (`Android/media/com.seafile.seadroid2/...`)"}}
{"actor":{"display_login":"nidomiro"}}