Saturday, September 28, 2024
1 change · 18.0
Security fixes and vulnerability patches
Project document folders no longer expose link-only documents to anonymous visitors through the project portal. This closes an access loophole so document permissions are consistently enforced for signed-in users only.
Original PR description
Inside the document folder of a project, create a new folder that is access_internal='view' and access_via_link='none'. Inside that folder create a document that is access_via_link='view'. From the…
Inside the document folder of a project, create a new folder that is access_internal='view' and access_via_link='none'. Inside that folder create a document that is access_via_link='view'. From the Documents application standpoint, you created a document that cannot be discovered by a public user, unless he get the access-token to that file. But you can access the file via the Project's documents even without the access token, because the conditional `res_id`, `res_model`, `access_via_link` are met. It means that if you're a logged-in portal user you won't see that file as the `user_permission` is correctly `none`. But you can disconnect, become a public user, and get access to the file. --- An explored solution was to create a dedicated "shared" folder for every project/task, and to place all publicly discoverable files within that folder. Files that should be shared on a link-only manner would be placed elsewhere would not be listed but for the portal users. This solution was rejected because it created too many folders. --- The solution here is to restrict accessing documents to logged-in users, so that the single always-valid `user_permission` field can be used and there's no need to re-engineer something for public users.