Skip to content

Commit

Permalink
rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
DDJavierSantos committed Nov 2, 2023
1 parent 89bb0f3 commit 9207c4b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import datadog.trace.api.iast.InstrumentationBridge;
import datadog.trace.api.iast.Source;
import datadog.trace.api.iast.SourceTypes;
import datadog.trace.api.iast.source.WebModule;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;

import datadog.trace.api.iast.propagation.PropagationModule;
import net.bytebuddy.asm.Advice;

@AutoService(Instrumenter.class)
Expand Down Expand Up @@ -50,10 +51,10 @@ public static class ParseAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
@Source(SourceTypes.REQUEST_MULTIPART_PARAMETER)
public static Map<String, String> onExit(@Advice.Return final Map<String, String> map) {
final WebModule module = InstrumentationBridge.WEB;
final PropagationModule module = InstrumentationBridge.PROPAGATION;
if (module != null) {
for (Map.Entry<String, String> entry : map.entrySet()) {
module.onMultipartValues(entry.getKey(), Collections.singleton(entry.getValue()));
module.taint(entry.getValue(), SourceTypes.REQUEST_MULTIPART_PARAMETER, entry.getKey());
}
}
return map;
Expand Down

0 comments on commit 9207c4b

Please sign in to comment.