Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarCloud scan #214

Merged
merged 6 commits into from May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/depgraph.js
Expand Up @@ -206,7 +206,7 @@ DependencyGraph.prototype = {
const pluginsSorted = [];
let time = 0;
for (let importedPlugin of Object.values(graph)) {
visit(importedPlugin, true);
visit(importedPlugin);
}
return pluginsSorted;

Expand Down
2 changes: 1 addition & 1 deletion lib/webapp.js
Expand Up @@ -1171,7 +1171,7 @@ function WebApp(options){
secure: 'auto'
}
}));
this.loopbackSecret = process.env.loopbackSecret ? process.env.loopbackSecret : 'different',
this.loopbackSecret = process.env.loopbackSecret ? process.env.loopbackSecret : 'different';
process.env.expressSessionSecret = undefined;
process.env.loopbackSecret = undefined;

Expand Down
8 changes: 5 additions & 3 deletions plugins/config/lib/configService.js
Expand Up @@ -432,8 +432,10 @@ function createMissingFolderAsync(resourcePath, scopeDirectory, callback){


function encodeDirectoryName(inputName){
var resourceLength = inputName.length;
var percentEncodedResource = percentEncode(inputName,percentEncodedResource,resourceLength);
//var resourceLength = inputName.length;
// TODO: Refactor percentEnconde method to include parameters for resource + resource length
//var percentEncodedResource = percentEncode(inputName,percentEncodedResource,resourceLength);
var percentEncodedResource = percentEncode(inputName);

return percentEncodedResource;
}
Expand Down Expand Up @@ -1115,7 +1117,7 @@ function respondWithConfigFile(response, filename, resource, directories, scope,
default:
{
var msg = "ZWED0067E - Aggregation policy type="+policy+" unhandled";
respondWithJsonError(response,msg,HTTP_STATUS_BAD_REQUEST,"Bad Request",location);
respondWithJsonError(response,msg,HTTP_STATUS_BAD_REQUEST,location);
logger.warn("ZWED0101W", policy); //logger.warn(msg);
}
}
Expand Down
14 changes: 9 additions & 5 deletions plugins/terminal-proxy/lib/ssh.js
Expand Up @@ -1288,12 +1288,16 @@ function readSSHv2PDUData(sessionData,rawData,currentPosition){
var receivedMac = Buffer.alloc(sessionData.readingMACLength);
rawData.copy(receivedMac,0,currentPosition);
currentPosition+=receivedMac.length;
if (receivedMac.toString('hex')!=computedMac.toString('hex')){
sshLogger.warn("mac verification failed. ");
if (computedMac == undefined) {
sshLogger.warn('mac verification failed')
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
} else {
if (receivedMac.toString('hex')!=computedMac.toString('hex')){
sshLogger.warn("mac verification failed. ");
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
}
if(traceCrypto) console.log("received mac: "+receivedMac.toString('hex'));
if(traceCrypto) console.log("computed mac: "+computedMac.toString('hex'));
DivergentEuropeans marked this conversation as resolved.
Show resolved Hide resolved
//should disconnect if not matching.
}
if(traceCrypto) console.log("received mac: "+receivedMac.toString('hex'));
if(traceCrypto) console.log("computed mac: "+computedMac.toString('hex'));
//should disconnect if not matching.
}
return {readLength: currentPosition, sshv2PDU: new SSHv2PDU(0,payload)};
}
Expand Down