From 8222ef815c1676827affba1c8b0e03705218aa7a Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 9 Jan 2012 13:12:25 +1100 Subject: [PATCH] 368114 Protect against non-Strings in System properties for Log --- jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java index 74f8e5fa66d..c1f42baa85e 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java @@ -102,7 +102,10 @@ public class Log while (systemKeyEnum.hasMoreElements()) { String key = systemKeyEnum.nextElement(); - __props.setProperty(key,System.getProperty(key)); + String val = System.getProperty(key); + //protect against application code insertion of non-String values (returned as null) + if (val != null) + __props.setProperty(key,val); } /* Now use the configuration properties to configure the Log statics