mathjs 7.5.0 → 7.5.1

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.
package/HISTORY.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # History
2
2
 
3
+ # 2020-10-10, version 7.5.1
4
+
5
+ - Fix object pollution vulnerability in `math.config`. Thanks Snyk.
6
+
7
+
3
8
  # 2020-10-07, version 7.5.0
4
9
 
5
10
  - Function `pickRandom` now allows randomly picking elements from matrices
package/dist/math.js CHANGED
@@ -6,8 +6,8 @@
6
6
  * It features real and complex numbers, units, matrices, a large set of
7
7
  * mathematical functions, and a flexible expression parser.
8
8
  *
9
- * @version 7.5.0
10
- * @date 2020-10-07
9
+ * @version 7.5.1
10
+ * @date 2020-10-10
11
11
  *
12
12
  * @license
13
13
  * Copyright (C) 2013-2020 Jos de Jong <wjosdejong@gmail.com>
@@ -1233,7 +1233,9 @@ function deepExtend(a, b) {
1233
1233
  }
1234
1234
 
1235
1235
  for (var prop in b) {
1236
- if (hasOwnProperty(b, prop)) {
1236
+ // We check against prop not being in Object.prototype or Function.prototype
1237
+ // to prevent polluting for example Object.__proto__.
1238
+ if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {
1237
1239
  if (b[prop] && b[prop].constructor === Object) {
1238
1240
  if (a[prop] === undefined) {
1239
1241
  a[prop] = {};
@@ -60659,7 +60661,7 @@ var createReplacer = /* #__PURE__ */Object(factory["a" /* factory */])(replacer_
60659
60661
  };
60660
60662
  });
60661
60663
  // CONCATENATED MODULE: ./src/version.js
60662
- var version = '7.5.0'; // Note: This file is automatically generated when building math.js.
60664
+ var version = '7.5.1'; // Note: This file is automatically generated when building math.js.
60663
60665
  // Changes made in this file will be overwritten.
60664
60666
  // CONCATENATED MODULE: ./src/plain/number/constants.js
60665
60667
  var constants_pi = Math.PI;