From 196b47ae652439e0bbf59d1e4d29c1f278429f9e Mon Sep 17 00:00:00 2001 From: Monu Lakshkar Date: Mon, 9 Oct 2023 11:52:02 +0530 Subject: [PATCH] Removed unused code --- .../httpclient50/SecurityHelper.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/instrumentation-security/httpclient-5.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient50/SecurityHelper.java b/instrumentation-security/httpclient-5.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient50/SecurityHelper.java index 1dff2d2ad..06bf8a86f 100644 --- a/instrumentation-security/httpclient-5.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient50/SecurityHelper.java +++ b/instrumentation-security/httpclient-5.0/src/main/java/com/newrelic/agent/security/instrumentation/httpclient50/SecurityHelper.java @@ -13,29 +13,9 @@ public class SecurityHelper { public static final String METHOD_NAME_EXECUTE = "execute"; - public static final String NULL_STRING = "null"; public static final String NR_SEC_CUSTOM_ATTRIB_NAME = "SSRF_OPERATION_LOCK_APACHE5-"; - public static String getURI(String scheme, String host, int port, String path) { - StringBuilder sb = new StringBuilder(); - if (scheme != null) { - sb.append(scheme); - sb.append("://"); - } - if (host != null) { - sb.append(host); - if (port >= 0) { - sb.append(":"); - sb.append(port); - } - } - if (path != null) { - sb.append(path); - } - return sb.toString(); - } - public static void registerExitOperation(boolean isProcessingAllowed, AbstractOperation operation) { try { if (operation == null || !isProcessingAllowed || !NewRelicSecurity.isHookProcessingActive() || NewRelicSecurity.getAgent().getSecurityMetaData().getRequest().isEmpty() @@ -55,10 +35,6 @@ public static AbstractOperation preprocessSecurityHook(HttpRequest request, Stri return null; } - // TODO : Need to check if this is required anymore in NR case. -// // Add Security app topology header -// this.addRequestProperty("K2-API-CALLER", ""); - // Add Security IAST header String iastHeader = NewRelicSecurity.getAgent().getSecurityMetaData().getFuzzRequestIdentifier().getRaw(); if (iastHeader != null && !iastHeader.trim().isEmpty()) {