Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-46893

Remove inline scripts from UI descriptions

    XMLWordPrintableJSON

Details

    Description

      Users can inject inline scripts (e.g. onclick or onmouseover handlers) in the UI job and stage descriptions.

      The UI already has precaution to treat, e.g., <script> tags as plain-text. But that doesn't extend to inline scripts.

      Example:

      Bad job descriptions
      scala> sc.setJobDescription("""<a href="/link" onmouseover="alert('oops');">onmouseover</a>""")
      
      scala> spark.sql("SELECT 1").show()
      ...
      
      scala> sc.setJobDescription("""<a href="/link" onclick="alert('oops');">onclick</a>""")
      
      scala> spark.sql("SELECT 1").show()
      ...
      

      Attachments

        1. Screen Recording 2024-01-28 at 17.51.47.mov
          1.16 MB
          Willi Raschkowski
        2. Screenshot 2024-01-29 at 09.06.34.png
          121 kB
          Willi Raschkowski

        Issue Links

          Activity

            People

              rshkv Willi Raschkowski
              rshkv Willi Raschkowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: