-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-17591. RBF: Router should follow X-FRAME-OPTIONS protection setting #6963
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
|
🎊 +1 overall
This message was automatically generated. |
ayushtkn
left a comment
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.
thanx @tasanuma for the fix, minor comments, rest lgtm
| public void testRouterXFrame() throws IOException { | ||
| Configuration conf = new HdfsConfiguration(); | ||
| conf.setBoolean(DFSConfigKeys.DFS_XFRAME_OPTION_ENABLED, true); | ||
| conf.set(DFSConfigKeys.DFS_XFRAME_OPTION_VALUE, "SAMEORIGIN"); |
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.
Can we use HttpServer2.XFrameOption.SAMEORIGIN.toString() rather than hardcoding the value?
| router.stop(); | ||
| router.close(); |
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.
can we have this in finally block or part of After block?, else if the test fails after router start, it won't stop/close the router
|
@ayushtkn Thanks for your review. I have updated the PR to address your comments. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
ayushtkn
left a comment
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
|
Merged. Thanks for your review, @ayushtkn ! |
…ing (apache#6963) (cherry picked from commit 059e996)
Description of PR
Router UI doesn't have X-FRAME-OPTIONS in its header. Router should load the value of dfs.xframe.value.
This issue is reported by Daiki Mashima.
How was this patch tested?
For code changes: