Improved: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709) Better style with line not too long
This commit is contained in:
+2
-1
@@ -116,7 +116,8 @@ public final class FreeMarkerWorker {
|
||||
} catch (TemplateException e) {
|
||||
Debug.logError("Unable to set date/time and number formats in FreeMarker: " + e, module);
|
||||
}
|
||||
String templateClassResolver = UtilProperties.getPropertyValue("security", "templateClassResolver", "SAFER_RESOLVER");
|
||||
String templateClassResolver = UtilProperties.getPropertyValue("security", "templateClassResolver",
|
||||
"SAFER_RESOLVER");
|
||||
switch (templateClassResolver) {
|
||||
case "UNRESTRICTED_RESOLVER":
|
||||
newConfig.setNewBuiltinClassResolver(TemplateClassResolver.UNRESTRICTED_RESOLVER);
|
||||
|
||||
Reference in New Issue
Block a user