nextcloud / nextcloud/end_to_end_encryption
Sanity check on server
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 320
- Forks
- 36
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 81
Description
To get a more bulletproofed upload process the server should do some checks to ensure that we always have a valid and consistent folder with the correct metadata and encrypted files:
- file size
- on lock the clients tell server the file size
- an unlock the server checks if the correct file size was transferred, otherwise revert and send error to client
- file check
- although the server cannot read the entire metadata file, it can check & ensure that the count of encrypted files matches the stored files in the folder
- on unlock: check if correct file count and file names are stored both in metadata and in local folder
While this should always be correct (as the clients should handle it correctly), with these enhancements we can make (more) sure that every upload is consistent.
The only potential problem (I can imagine) then is that the clients uploads a "wrong" playload, e.g. you cannot decrypt it anymore.
--> with this we check for
- file size
- file count
- encrypted file name
- #20: allows to revert a single upload to a consistent state
@MorrisJobke (as we discussed it)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload does not name files or tests. Start by locating the server's upload lock/unlock handlers and the metadata and folder validation path; compare the requested size, file-count, and encrypted-name checks with issue #20's revert behavior. Done means inconsistent uploads are detected, reverted to a consistent state, and reported to the client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100