-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix public link path for persistent locks #34229
Conversation
8eb7863
to
793d0d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #34229 +/- ##
============================================
- Coverage 64.75% 64.75% -0.01%
- Complexity 18362 18364 +2
============================================
Files 1198 1198
Lines 69533 69540 +7
Branches 1281 1281
============================================
+ Hits 45026 45028 +2
- Misses 24134 24139 +5
Partials 373 373
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #34229 +/- ##
============================================
+ Coverage 64.76% 64.76% +<.01%
- Complexity 18363 18365 +2
============================================
Files 1198 1198
Lines 69538 69545 +7
Branches 1281 1281
============================================
+ Hits 45035 45042 +7
Misses 24130 24130
Partials 373 373
Continue to review full report at Codecov.
|
@davitol FYI see test plan in the section above @DeepDiver1975 please review |
Spotted by @individual-it: with a PROPFIND a client can find out the locktoken, so a nasty client can overwrite resources even they are locked by an other user. Steps to reproduce
|
Idea: only expose the lock token if the lock owner is NULL, which refers to a lock that has been created through the public API. if the lock was created by a logged in user, don't reveal it. @DeepDiver1975 thoughts ? |
ok I think I'll always hide the lock token for public users. there is no UI to unlock there and whoever created the lock already has the token somewhere the file owner can still unlock with the UI as they have the token |
note: also tested trying to lock "sub" through public webdav while "public" was locked.
|
|
https://tools.ietf.org/html/rfc4918#section-6.5 says that
which means we should be able to hide them. However Sabre still returns the lock even when empty... Will need an upstream patch. |
Upstream PR: sabre-io/dav#1130 |
@ownclouders rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
793d0d4
to
cbaa20d
Compare
Automated rebase with GitMate.io was successful! 🎉 |
pushed a couple of acceptance tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@individual-it acceptance tests look good, just little comments
cf11e67
to
2ff4282
Compare
@phil-davis fixed the things you commented on Additionally added tests that check the locktoken. See #34229 (comment) |
When querying lock info on public links, always return a path relative to the public webdav endpoint.
2ff4282
to
26780ed
Compare
26780ed
to
207e059
Compare
stable10: #34267 I forgot to push the solution for #34229 (comment), it will be in a separate PR |
Description
When querying lock info on public links, always return a path relative
to the public webdav endpoint.
Related Issue
Fixes #34225
Motivation and Context
How Has This Been Tested?
With "/public/share" being the link share:
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: