Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Dec 10, 2025

What changes were proposed in this pull request?

This PR backports #53364 to branch-4.0.

This PR aims to escape user name displayed in historypage.

Why are the changes needed?

Similar to the issue resolved in #52851, user name should also get escaped because arbitrary user name can be set through the env var SPARK_USER.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

User name displayed in historypage is escaped even if the name is like <script>alert('XSS')</script>

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member

It's the same reason, @sarutak .

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you for waiting for Apache Spark 4.1.0, @sarutak . There is no report on SPARK-54625.

Merged to branch-4.0.

dongjoon-hyun pushed a commit that referenced this pull request Dec 18, 2025
### What changes were proposed in this pull request?
This PR backports #53364 to `branch-4.0`.

This PR aims to escape user name displayed in historypage.

### Why are the changes needed?
Similar to the issue resolved in #52851, user name should also get escaped because arbitrary user name can be set through the env var `SPARK_USER`.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
User name displayed in historypage is escaped even if the name is like `<script>alert('XSS')</script>`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #53424 from sarutak/fix-username-xss-4.0.

Authored-by: Kousuke Saruta <sarutak@amazon.co.jp>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@sarutak
Copy link
Member Author

sarutak commented Dec 19, 2025

@dongjoon-hyun
Thank you! As the similar issue (#52851) has already been backported into branch-3.5, can we backport this into branch-3.5 too?

@dongjoon-hyun
Copy link
Member

Of cource, @sarutak .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants