-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
we don't need to check permissions twice #284
Conversation
👍 |
@@ -320,16 +320,10 @@ public static function rollback($file, $revision) { | |||
// add expected leading slash | |||
$file = '/' . ltrim($file, '/'); | |||
list($uid, $filename) = self::getUidAndFilename($file); | |||
if ($uid === null || trim($filename, '/') === '') { |
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.
I'm pretty sure this is needed to handle some edge cases but I don't remember the details
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.
I can't think of any, but I will put it back... can't hurt. Also the tests seems not to handle such edge cases
1400030
to
2cf4530
Compare
@icewind1991 I added the additional check again, please review. Thanks! |
Can you backport the additional check also to stable9? |
@LukasReschke done: #304 |
👍 |
1 similar comment
👍 |
we check the permission already here: https://github.com/nextcloud/server/compare/cleanup-after-sync?expand=1#diff-efc44835a2c59b3707c965b80a3d669eL338
cc @LukasReschke @MorrisJobke