Skip to content

Commit d615199

Browse files
committed
log4shell prevention
jPOS doesn't use log4j, but here is our 2c to mitigate the problem in jPOS based applications that might use log4j
1 parent 78c4fd6 commit d615199

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • jpos/src/main/java/org/jpos/q2

jpos/src/main/java/org/jpos/q2/Q2.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ private void parseCmdLine (String[] args) {
740740
options.addOption ("Ed", "envdir", true, "Environment file directory, defaults to cfg");
741741

742742
try {
743+
System.setProperty("log4j2.formatMsgNoLookups", "true"); // log4shell prevention
744+
743745
CommandLine line = parser.parse (options, args);
744746
if (line.hasOption ("v")) {
745747
displayVersion();

0 commit comments

Comments
 (0)