Skip to content

Commit

Permalink
Merge pull request t-system#8 from t-system/audit-fix
Browse files Browse the repository at this point in the history
update to lodash without vulnerability
  • Loading branch information
bigmarty authored May 17, 2018
2 parents 9944b9e + 1c8a660 commit 7d94938
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/security/jsbn.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Basic JavaScript BN library - subset useful for RSA encryption.
*
*
* Copyright (c) 2003-2005 Tom Wu
* All Rights Reserved.
*
Expand All @@ -15,9 +15,9 @@
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
Expand All @@ -37,7 +37,7 @@
*/

var crypt = require('crypto');
var _ = require('lodash');
var isNumber = require('lodash.isnumber');

// Bits per digit
var dbits;
Expand Down Expand Up @@ -112,7 +112,7 @@ function am3(i, x, w, j, c, n) {
return c;
}

// We need to select the fastest one that works in this environment.
// We need to select the fastest one that works in this environment.
//if (j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
// BigInteger.prototype.am = am2;
// dbits = 30;
Expand Down Expand Up @@ -832,7 +832,7 @@ function bnToBuffer(trimOrSize) {
var res = new Buffer(this.toByteArray());
if (trimOrSize === true && res[0] === 0) {
res = res.slice(1);
} else if (_.isNumber(trimOrSize)) {
} else if (isNumber(trimOrSize)) {
if (res.length > trimOrSize) {
for (var i = 0; i < res.length - trimOrSize; i++) {
if (res[i] !== 0) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"az-bunyan": "0.2.0-alpha.2",
"azure-storage": "^2.8.2",
"bunyan": "^1.8.12",
"lodash": "^4.17.10"
"lodash.isnumber": "^3.0.3"
}
}

0 comments on commit 7d94938

Please sign in to comment.