diff --git a/src/components/core/compute/initialize.ts b/src/components/core/compute/initialize.ts index 11e6cc07c..a6cedf0c6 100644 --- a/src/components/core/compute/initialize.ts +++ b/src/components/core/compute/initialize.ts @@ -49,10 +49,12 @@ export class ComputeInitializeHandler extends Handler { } async handle(task: ComputeInitializeCommand): Promise { + console.log('BEFORE: ', task) const validationResponse = await this.verifyParamsAndRateLimits(task) if (this.shouldDenyTaskHandling(validationResponse)) { return validationResponse } + console.log('AFTER: ', task) try { let foundValidCompute = null diff --git a/src/components/httpRoutes/validateCommands.ts b/src/components/httpRoutes/validateCommands.ts index be0511928..f36e5dfcb 100644 --- a/src/components/httpRoutes/validateCommands.ts +++ b/src/components/httpRoutes/validateCommands.ts @@ -38,10 +38,15 @@ export function validateCommandParameters( return buildInvalidRequestMessage(`Invalid or unrecognized command: "${commandStr}"`) } - const logCommandData = commandData + // deep copy + const logCommandData = structuredClone(commandData) + if (commandStr === PROTOCOL_COMMANDS.ENCRYPT) { - logCommandData.files = [] // hide files data for logging + logCommandData.files = [] // hide files data (sensitive) + rawData (long buffer) from logging + } else if (commandStr === PROTOCOL_COMMANDS.ENCRYPT_FILE && commandData.rawData) { + logCommandData.rawData = [] } + CORE_LOGGER.info( `Checking received command data for Command "${commandStr}": ${JSON.stringify( logCommandData,