You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "rshkv (via GitHub)" <gi...@apache.org> on 2024/01/29 09:25:06 UTC

[PR] [SPARK-46893][UI] Remove inline scripts from UI descriptions [spark]

rshkv opened a new pull request, #44933:
URL: https://github.com/apache/spark/pull/44933

   ### What changes were proposed in this pull request?
   This PR prevents malicious users from injecting inline scripts via job and stage descriptions.
   
   Spark's Web UI [already checks the security of job and stage descriptions](https://github.com/apache/spark/blob/a368280708dd3c6eb90bd3b09a36a68bdd096222/core/src/main/scala/org/apache/spark/ui/UIUtils.scala#L528-L545) before rendering them as HTML (or treating them as plain text). The UI already disallows `<script>` tags but doesn't protect against attributes with inline scripts like `onclick` or `onmouseover`.
   
   ### Why are the changes needed?
   On multi-user clusters, bad users can inject scripts into their job and stage descriptions. The UI already finds that [worth protecting against](https://github.com/apache/spark/blob/a368280708dd3c6eb90bd3b09a36a68bdd096222/core/src/main/scala/org/apache/spark/ui/UIUtils.scala#L533-L535). So this is extending that protection to scripts in attributes.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes if users relied on inline scripts or attributes in their job or stage descriptions.
   
   ### How was this patch tested?
   Added tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46893][UI] Remove inline scripts from UI descriptions [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #44933:
URL: https://github.com/apache/spark/pull/44933#issuecomment-1916178551

   Merged to master/3.5/3.4 for Apache Spark 4.0, 3.5.1, and 3.4.3.
   
   This will be included in all next non-EOL releases, @rshkv .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46893][UI] Remove inline scripts from UI descriptions [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #44933: [SPARK-46893][UI] Remove inline scripts from UI descriptions
URL: https://github.com/apache/spark/pull/44933


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org