Skip to content

Commit

Permalink
log4shell prevention
Browse files Browse the repository at this point in the history
jPOS doesn't use log4j, but here is our 2c to mitigate the problem
in jPOS based applications that might use log4j
  • Loading branch information
ar committed Dec 13, 2021
1 parent 78c4fd6 commit d615199
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jpos/src/main/java/org/jpos/q2/Q2.java
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,8 @@ private void parseCmdLine (String[] args) {
options.addOption ("Ed", "envdir", true, "Environment file directory, defaults to cfg");

try {
System.setProperty("log4j2.formatMsgNoLookups", "true"); // log4shell prevention

CommandLine line = parser.parse (options, args);
if (line.hasOption ("v")) {
displayVersion();
Expand Down

0 comments on commit d615199

Please sign in to comment.