@newrelic/security-agent 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -140,8 +140,6 @@ function initialize() {
|
|
|
140
140
|
// Initialize Agent Status
|
|
141
141
|
const status = agentStatus.getInstance();
|
|
142
142
|
|
|
143
|
-
// Initialize Collector config
|
|
144
|
-
|
|
145
143
|
// Initialize
|
|
146
144
|
Agent.init(applicationInfo, logger, wsClient, status);
|
|
147
145
|
initLogger.info(LOG_MESSAGES.AGENT_INIT_SUCCESSFUL, applicationInfo.pid, applicationInfo.applicationUUID);
|
package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js
CHANGED
|
@@ -11,7 +11,7 @@ const { Agent } = require('../../../agent');
|
|
|
11
11
|
const { FuzzFailEvent } = require('../../../FuzzFailEvent');
|
|
12
12
|
const { hasWorker: isWorkerSupported } = require('../../../commonUtils');
|
|
13
13
|
const { CSEC_HOME_TMP, COLON, NR_CSEC_FUZZ_REQUEST_ID } = require('../../../sec-agent-constants');
|
|
14
|
-
const LOCALHOST = '
|
|
14
|
+
const LOCALHOST = 'localhost';
|
|
15
15
|
const COLON_SLASH_SLASH = '://';
|
|
16
16
|
const http = require('http');
|
|
17
17
|
const https = require('https');
|
|
@@ -121,9 +121,10 @@ function handleFuzzResponse (request, fuzzDetails) {
|
|
|
121
121
|
* @param {JSON} requestObject
|
|
122
122
|
*/
|
|
123
123
|
function parseAxiosHttpRequestToFuzz (requestObject) {
|
|
124
|
-
|
|
124
|
+
let serverName = requestObject.serverName ? requestObject.serverName : LOCALHOST;
|
|
125
|
+
let host = serverName + COLON + requestObject.serverPort
|
|
125
126
|
return {
|
|
126
|
-
url: requestObject.protocol + COLON_SLASH_SLASH +
|
|
127
|
+
url: requestObject.protocol + COLON_SLASH_SLASH + host + requestObject.url,
|
|
127
128
|
method: requestObject.method,
|
|
128
129
|
data: requestObject.body,
|
|
129
130
|
headers: requestObject.headers,
|