zhengruifeng commented on code in PR #53267:
URL: https://github.com/apache/spark/pull/53267#discussion_r2579552574


##########
core/src/test/scala/org/apache/spark/SparkContextSuite.scala:
##########
@@ -1369,6 +1369,24 @@ class SparkContextSuite extends SparkFunSuite with 
LocalSparkContext with Eventu
     assert(msg.contains("Cannot use the keyword 'proxy' or 'history' in 
reverse proxy URL"))
   }
 
+  test("Security: newline disallowed in spark.ui.allowFramingFrom") {
+    val injection =
+      """
+        |some
+        |injected
+        |values
+        |""".stripMargin
+    assert(injection.contains("\n"))
+
+    val conf = new SparkConf().setAppName("testAppAttemptId")
+      .setMaster("pushbasedshuffleclustermanager")
+      .set(UI_ALLOW_FRAMING_FROM, injection)
+    val msg = intercept[java.lang.IllegalArgumentException] {
+      conf.get(UI_ALLOW_FRAMING_FROM)

Review Comment:
   it is kind of weird that `checkValue` is triggered in `conf.get` instead of 
`conf.set`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to