-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup/Improve storage.py #512
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On Windows 1/2 would be a safe filesystem path component, but it's not safe to pass it to path_to_filesystem. Currently only the get method can be called with a href like that and it checked for that. This just moves the check into the is_safe_filesystem_path_component function.
Etags are not checked in storage anymore and this is unused.
Currently it's not possible to exploit these.
They are unnecessary since the discover methods stopped returning collections that actually don't exist.
fd sounds more like file descriptions. prop doesn't sound like a file at all.
Leftovers from failed transactions etc. should not change that property.
It's the same as BaseCollection.has
If vobject can't parse a component it raises an exception, but the filename of that component is missing in the logs.
If someone uploads a file that starts or ends with the chars {}, all REPORT requests on that collection will fail and it's impossible to delete the file.
Closed
Thanks a lot! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a12ef69 and 5dbf9df add missing checks for safe conversion of paths to the local filesystem. They are only relevant on Windows and currently it's not possible to exploit it.
6df54bf adds a log message that includes the name of a faulty component. Before only the exception from vobject showed up in the log but the filename of the component that caused the error was missing.
The Collection.get method stripped {} from
href
, 03fbb1e removes that. If someone uploaded a component that starts or ends with { or }, all REPORT requests on that collection failed and it was impossible to delete the component.@liZe Why was that there in the first place? I couldn't find something like this in the relevant RFCs and hope removing it doesn't break some client.
de09f66 changes last_modified to only look at relevant files.
All other changes are just cosmetic.