-
-
Notifications
You must be signed in to change notification settings - Fork 343
fix filtering symlinks in webdav methods #1502
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
Conversation
c9df1b1
to
66d855f
Compare
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.
Almost there!
} | ||
Box::pin(async move { | ||
if !self.is_path_allowed(path).await { | ||
return Err(DavFsError::NotFound); |
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.
Maybe log something here so it's a bit easier to debug?
} else { | ||
Box::pin(ready(Err(DavFsError::NotFound))) | ||
} | ||
Box::pin(async move { |
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.
So many pin
s D:
} | ||
Some(Ok(e)) | ||
} | ||
Err(e) => Some(Err(e)), |
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.
Hmmm is this right? Won't this result in weird entries? Also, should we log here?
} | ||
Box::pin(async move { | ||
if !self.is_path_allowed(path).await { | ||
Err(DavFsError::NotFound) |
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.
Maybe log something here?
This allows
--enable-webdav
and--no-symlinks
to be used together, and adds the necessary filtering.