Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
monu-k2io committed Oct 9, 2023
1 parent 7bf44a0 commit 196b47a
Showing 1 changed file with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()) {
Expand Down

0 comments on commit 196b47a

Please sign in to comment.