{"action":"created","issue":{"url":"https://api.github.com/repos/nextcloud/server/issues/7047","repository_url":"https://api.github.com/repos/nextcloud/server","labels_url":"https://api.github.com/repos/nextcloud/server/issues/7047/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/server/issues/7047/comments","events_url":"https://api.github.com/repos/nextcloud/server/issues/7047/events","html_url":"https://github.com/nextcloud/server/pull/7047","id":270745440,"number":7047,"title":"Add support for files with no permissions","user":{"login":"danxuliu","id":26858233,"avatar_url":"https://avatars1.githubusercontent.com/u/26858233?v=4","gravatar_id":"","url":"https://api.github.com/users/danxuliu","html_url":"https://github.com/danxuliu","followers_url":"https://api.github.com/users/danxuliu/followers","following_url":"https://api.github.com/users/danxuliu/following{/other_user}","gists_url":"https://api.github.com/users/danxuliu/gists{/gist_id}","starred_url":"https://api.github.com/users/danxuliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danxuliu/subscriptions","organizations_url":"https://api.github.com/users/danxuliu/orgs","repos_url":"https://api.github.com/users/danxuliu/repos","events_url":"https://api.github.com/users/danxuliu/events{/privacy}","received_events_url":"https://api.github.com/users/danxuliu/received_events","type":"User","site_admin":false},"labels":[{"id":389003733,"url":"https://api.github.com/repos/nextcloud/server/labels/3.%20to%20review","name":"3. to review","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/nextcloud/server/milestones/20","html_url":"https://github.com/nextcloud/server/milestone/20","labels_url":"https://api.github.com/repos/nextcloud/server/milestones/20/labels","id":2413097,"number":20,"title":"Nextcloud 13","description":null,"creator":{"login":"jancborchardt","id":925062,"avatar_url":"https://avatars2.githubusercontent.com/u/925062?v=4","gravatar_id":"","url":"https://api.github.com/users/jancborchardt","html_url":"https://github.com/jancborchardt","followers_url":"https://api.github.com/users/jancborchardt/followers","following_url":"https://api.github.com/users/jancborchardt/following{/other_user}","gists_url":"https://api.github.com/users/jancborchardt/gists{/gist_id}","starred_url":"https://api.github.com/users/jancborchardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jancborchardt/subscriptions","organizations_url":"https://api.github.com/users/jancborchardt/orgs","repos_url":"https://api.github.com/users/jancborchardt/repos","events_url":"https://api.github.com/users/jancborchardt/events{/privacy}","received_events_url":"https://api.github.com/users/jancborchardt/received_events","type":"User","site_admin":false},"open_issues":174,"closed_issues":728,"state":"open","created_at":"2017-03-27T10:04:28Z","updated_at":"2017-11-07T20:55:09Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2017-11-02T17:44:13Z","updated_at":"2017-11-08T00:00:25Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/nextcloud/server/pulls/7047","html_url":"https://github.com/nextcloud/server/pull/7047","diff_url":"https://github.com/nextcloud/server/pull/7047.diff","patch_url":"https://github.com/nextcloud/server/pull/7047.patch"},"body":"Until now it was safe to assume that every file was readable by its owner, but with the introduction of end to end encryption that is no longer the case. Therefore, the server now must explicitly return whether a file is readable or not, and the web UI has to be prepared to handle files with no permissions (which is simply a matter of fixing some code that assumed that the file would always have at least the read permission).\r\n\r\nThis is a requisite for proper handling of encrypted folders in #6670.\r\n"},"comment":{"url":"https://api.github.com/repos/nextcloud/server/issues/comments/342664775","html_url":"https://github.com/nextcloud/server/pull/7047#issuecomment-342664775","issue_url":"https://api.github.com/repos/nextcloud/server/issues/7047","id":342664775,"user":{"login":"danxuliu","id":26858233,"avatar_url":"https://avatars1.githubusercontent.com/u/26858233?v=4","gravatar_id":"","url":"https://api.github.com/users/danxuliu","html_url":"https://github.com/danxuliu","followers_url":"https://api.github.com/users/danxuliu/followers","following_url":"https://api.github.com/users/danxuliu/following{/other_user}","gists_url":"https://api.github.com/users/danxuliu/gists{/gist_id}","starred_url":"https://api.github.com/users/danxuliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danxuliu/subscriptions","organizations_url":"https://api.github.com/users/danxuliu/orgs","repos_url":"https://api.github.com/users/danxuliu/repos","events_url":"https://api.github.com/users/danxuliu/events{/privacy}","received_events_url":"https://api.github.com/users/danxuliu/received_events","type":"User","site_admin":false},"created_at":"2017-11-08T00:00:25Z","updated_at":"2017-11-08T00:00:25Z","author_association":"MEMBER","body":">  Mmmm I'm not sure this is right. Because the file is still readable by the owner. It is just encrypted.\r\n\r\nIt is not readable, at least not from the point of view of the web UI (or any other insecure client). When installed in the server, the [E2E encryption app](https://github.com/nextcloud/end_to_end_encryption) blocks all the permissions in responses to `PROPFIND` requests, no matter the actual permissions of the file. So if an encrypted file can not be updated, deleted, shared... it should not be seen as readable either.\r\n\r\nBut encryption aside this pull request simply makes the readable permission more consistent with the other permissions; the other permissions are explicitly returned by the server if they are set for a file, but _readable_ was never returned and the web UI simply assumed that it was always set. Now the server explicitly returns the _readable_ permission if it is set for a file and the web UI honours the returned permissions.\r\n\r\n>  If I'm not mistaken the folder that is encrypted has the encrypted flag set.\r\n>  \r\n>  So the js should check for that...\r\n\r\nThe reason to use the permissions instead of the encrypted flag was to avoid introducing specific cases and to use the general code instead (after the needed fixes, I mean ;-) ).\r\n"}}
{"actor":{"display_login":"danxuliu"}}