You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2025/12/02 04:38:53 UTC
Re: [PR] [SPARK-54563][UI] Disallow newline in `spark.ui.allowFramingFrom` [spark]
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: 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