-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33195][UI] Fix stages/stage UI page fails because of uri parameters encoded twice #32317
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
[SPARK-33195][UI] Fix stages/stage UI page fails because of uri parameters encoded twice #32317
Conversation
7a95234 to
da616a6
Compare
|
cc @sarutak and @gengliangwang FYI |
Could you add the new test? |
…ters encoded twice
da616a6 to
7f7adb8
Compare
|
Hi @mdianjun , could you re-trigger the test on your repository? |
|
ok to test. |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #138015 has finished for PR 32317 at commit
|
| isSearch = true | ||
| searchValue = uriQueryParameters.getFirst("search[value]") | ||
| } else { | ||
| searchValue = null |
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.
Is this redundant right?
| // refer https://datatables.net/manual/server-side. | ||
| if (uriQueryParameters.getFirst("search[value]") != null && | ||
| uriQueryParameters.getFirst("search[value]").length > 0) { | ||
| searchValue = encodeKeyAndGetValue(uriQueryParameters, "search[value]", null) |
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.
Should we consider the case that searchValue is also encoded?
| stageAttemptId: Int, isSearch: Boolean, totalRecords: Int): Seq[TaskData] = { | ||
| var columnNameToSort = queryParameters.getFirst("columnNameToSort") | ||
| columnNameToSort = URLDecoder.decode(columnNameToSort, "UTF-8") | ||
| columnNameToSort = URLDecoder.decode(columnNameToSort, "UTF-8") |
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.
It's not obvious that the reason why columnNameToSort is decoded twice here.
Also, it may be safe for now but it's difficult to ensure the safety of decoding twice here.
|
@mdianjun Sorry for the late reply. |
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
The similar PR is: #29271, which is reproduced with HTTPS reverse proxy.
This PR is used to fix a similar issue in HTTP reverse proxy, described at https://issues.apache.org/jira/browse/SPARK-33195.
Why are the changes needed?
Fix a UI issue when HTTP is enabled
Does this PR introduce any user-facing change?
No.
How was this patch tested?
A new Unit test + manually test on a cluster (Added later).