haraka-config
Advanced tools
Comparing version
@@ -7,8 +7,4 @@ # Changelog | ||
### [1.2.1] - 2024-04-24 | ||
### [1.2.2] - 2024-04-24 | ||
- config: guard against prototype pollution | ||
### [1.2.0] - 2024-04-14 | ||
- feat: getDir can parse different types of files in a dir | ||
@@ -33,2 +29,3 @@ - feat: all file readers now have load and loadPromise, so that | ||
- deps: version bumps | ||
- config: guard against prototype pollution | ||
@@ -133,3 +130,2 @@ ### [1.1.0] - 2022-05-27 | ||
[1.1.0]: https://github.com/haraka/haraka-config/releases/tag/1.1.0 | ||
[1.2.0]: https://github.com/haraka/haraka-config/releases/tag/v1.2.0 | ||
[1.2.1]: https://github.com/haraka/haraka-config/releases/tag/v1.2.1 | ||
[1.2.2]: https://github.com/haraka/haraka-config/releases/tag/v1.2.2 |
@@ -37,7 +37,7 @@ 'use strict' | ||
// these work when this is loaded with require('haraka-config') | ||
if (/node_modules[\\/]haraka-config$/.test(__dirname)) { | ||
// when loaded with require('haraka-config') | ||
if (/node_modules\/haraka-config\/lib$/.test(__dirname)) { | ||
config_dir_candidates = [ | ||
path.join(__dirname, '..', '..', 'config'), // haraka/Haraka/* | ||
path.join(__dirname, '..', '..'), // npm packaged modules | ||
path.join(__dirname, '..', '..', '..', 'config'), // haraka/Haraka/* | ||
path.join(__dirname, '..', '..', '..'), // npm packaged modules | ||
] | ||
@@ -54,3 +54,3 @@ } | ||
} catch (ignore) { | ||
console.error(ignore.message) | ||
// console.error(ignore.message) | ||
} | ||
@@ -151,5 +151,6 @@ } | ||
const type = opts.type ?? this.getType(file) | ||
contents.push( | ||
this.load_config(path.resolve(name, file), type, opts), | ||
) | ||
contents.push({ | ||
path: file, | ||
data: this.load_config(path.resolve(name, file), type, opts), | ||
}) | ||
} | ||
@@ -156,0 +157,0 @@ return contents |
@@ -6,3 +6,3 @@ { | ||
"description": "Haraka's config file loader", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"homepage": "http://haraka.github.io", | ||
@@ -9,0 +9,0 @@ "repository": { |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
712
0.14%0
-100%36238
-0.18%