Skip to content

Commit

Permalink
Remove stringjs dependency due to vulnerability in string 3.3. It is …
Browse files Browse the repository at this point in the history
…used so little there is no need for the extra dependency in Swagger-tools.

Source: CERT
Name: https://nodesecurity.io/advisories/536
Url: https://nodesecurity.io/advisories/536
Source: CERT
Name: jprichardson/string.js#212
Url: jprichardson/string.js#212
  • Loading branch information
skillsoftstevemarusa committed Oct 17, 2017
1 parent 3d0a607 commit 212f14a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 7 additions & 3 deletions bin/swagger-tools
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ var path = require('path');
var pkg = require('../package.json');
var program = require('commander');
var request = require('superagent');
var S = require('string');
var YAML = require('js-yaml');

String.prototype.padRight = function (length) {
var pad = Array(256).join(' ');
return (this + pad).substring(0, length);
};

var exitWithError = function (msg) {
console.error();
console.error(' error: ' + msg);
Expand Down Expand Up @@ -222,8 +226,8 @@ program
console.log('Swagger ' + version + ' Information:');
console.log();

console.log(' ' + S('documentation url').padRight(paddingAmount).s + spec.docsUrl);
console.log(' ' + S('schema(s) url').padRight(paddingAmount).s + spec.schemasUrl);
console.log(' ' + 'documentation url'.padRight(paddingAmount) + spec.docsUrl);
console.log(' ' + 'schema(s) url'.padRight(paddingAmount) + spec.schemasUrl);
console.log();
});

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"qs": "^6.0.3",
"serve-static": "^1.10.0",
"spark-md5": "^3.0.0",
"string": "^3.3.0",
"superagent": "^3.5.2",
"swagger-converter": "^0.1.7",
"traverse": "^0.6.6",
Expand Down

0 comments on commit 212f14a

Please sign in to comment.