Read-only files can be edited and saved via third-party apps, causing sync loop and permission errors
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Prepare a read-only file: Another user shares a file with the permissions restricted to read-only
2. In a 3rd-Party app: open the file from nextcloud using the system picker. I used KeepassDX
3. In 3rd-Party app: save a modified file.
### Expected behaviour
1. The 3rd-Party app notices that it is opening the file as read-only and may propagate this to the user.
2. At latest, when trying to save the file, some error message should pop up.
### Actual behaviour
1. The 3rd-Party app does not notice the permission-restriction. The file is opened for edit.
2. The 3rd-Party app can save a modified file.
3. Nextcloud App trys to synchronize the file. This results in transmission error "Berechtigungsfehler" (permission error?). The transmission is retried again and again, resulting in a sync-loop.
4. When the file is loaded again in the 3rd-Party app, the modified version is loaded.
5. The only way to recover i found was to delete the file in "Auf dem Gerät" (On the device?) locally. This way i lost the made changes. It took me quiet some time to discover, that i have to delete it there.
### Android version
11
### Device brand and model
Nokia 6.2
### Stock or custom OS?
Stock
### Nextcloud android app version
3.32.3
### Nextcloud server version
30.0.12
### Using a reverse proxy?
No
### Android logs
_No response_
### Server error logs
```bash
```
### Additional information
i have no logging facilities set up. If you really need a log of this, i can try to set this up later.
Contributor guide
Assessment
This issue has not been assessed yet.