Skip to content

Commit bac54a8

Browse files
Janith BandaraJanith Bandara
authored andcommitted
fixed security issue
1 parent 14abefa commit bac54a8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/main/java/org/audit4j/core/Context.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ final static void init() {
162162
defaultAnnotationTransformer.setSerializer(serializerCommand.getSerializer());
163163
}
164164
annotationTransformer = defaultAnnotationTransformer;
165-
165+
166166
// Initialize IO streams.
167167
initStreams();
168168

@@ -347,7 +347,9 @@ private static void initHandlers() {
347347
for (Handler handler : conf.getHandlers()) {
348348
try {
349349
if (!configContext.getHandlers().contains(handler)) {
350-
handler.setProperties(configContext.getProperties());
350+
Map<String, String> handlerproperties = new HashMap<>();
351+
handlerproperties.putAll(configContext.getProperties());
352+
handler.setProperties(handlerproperties);
351353
handler.init();
352354
configContext.addHandler(handler);
353355
}

src/main/java/org/audit4j/core/handler/Handler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.audit4j.core.handler;
2020

2121
import java.io.Serializable;
22+
import java.util.HashMap;
2223
import java.util.Map;
2324

2425
import org.audit4j.core.Initializable;
@@ -85,7 +86,7 @@ public AuditEvent getAuditEvent() {
8586
* @param auditEvent
8687
* the new audit event
8788
*/
88-
public void setAuditEvent(AuditEvent auditEvent) {
89+
public void setAuditEvent(final AuditEvent auditEvent) {
8990
this.auditEvent = auditEvent;
9091
}
9192

@@ -115,7 +116,7 @@ public String getProperty(String key) {
115116
* @param properties
116117
* the properties
117118
*/
118-
public void setProperties(Map<String, String> properties) {
119+
public void setProperties(final Map<String, String> properties) {
119120
this.properties = properties;
120121
}
121122
}

0 commit comments

Comments
 (0)