mastercontroller 1.3.21 → 1.3.22

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.
@@ -75,7 +75,8 @@ const ERROR_CODES = {
75
75
  * Levenshtein distance for "Did you mean?" suggestions
76
76
  */
77
77
  function levenshteinDistance(str1, str2) {
78
- // Guard against extremely long strings (e.g. malicious bot requests)
78
+ // Guard against non-strings (objects, regex, undefined) and extremely long paths
79
+ if (typeof str1 !== 'string' || typeof str2 !== 'string') return Infinity;
79
80
  if (str1.length > 200 || str2.length > 200) return Infinity;
80
81
  const len1 = str1.length;
81
82
  const len2 = str2.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastercontroller",
3
- "version": "1.3.21",
3
+ "version": "1.3.22",
4
4
  "description": "Fortune 500 ready Node.js MVC framework with enterprise security, monitoring, and horizontal scaling",
5
5
  "main": "MasterControl.js",
6
6
  "license": "MIT",