Skip to content

Commit

Permalink
Add HttpServletRequest check
Browse files Browse the repository at this point in the history
  • Loading branch information
jandro996 committed Mar 12, 2024
1 parent 18584de commit eba1968
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.SessionTrackingMode;
import javax.servlet.http.HttpServletRequest;
import net.bytebuddy.asm.Advice;

public class IastServlet3Advice {
Expand All @@ -23,6 +24,9 @@ public static void onExit(@Advice.Argument(0) ServletRequest request) {
if (applicationModule == null && sessionRewritingModule == null) {
return;
}
if (!(request instanceof HttpServletRequest)) {
return;
}
final ServletContext context = request.getServletContext();
if (InstrumentationContext.get(ServletContext.class, String.class).get(context) != null) {
return;
Expand Down

0 comments on commit eba1968

Please sign in to comment.