-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[NO-ISSUE] Prevent directory escape bypass through repeated URL decoding #4891
base: master
Are you sure you want to change the base?
Conversation
cc @jongyoul |
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.
Just a few minor comments. The five attempts seem quite random. But I think it's good that an error message is thrown afterwards.
zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
Outdated
Show resolved
Hide resolved
zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java
Outdated
Show resolved
Hide resolved
@Reamer Thank you for the feedback! I've added a commit based on your feedback. I agree that using five attempts feels somewhat arbitrary. However I couldn't think of a better alternative, so I went with this value. |
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.
LGTM, let's wait for CI
I read the change and understand what it does, but I don't understand why should this change. |
I agree with @pan3793 . Please create a Jira ticket and adjust the pull request description accordingly. |
What is this PR for?
This PR addresses an issue in
NotebookService
where the notebook path validation only performs a single decoding pass.This allowed a malicious user to bypass validation by double-encoding the
".."
token.By implementing the repeated decoding, we can prevent this bypass.
Additionally, to prevent excessive decoding attempts, a maximum limit on the number of decoding attempts has been added.
What type of PR is it?
Hot Fix
How should this be tested?
Questions: