🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

haraka-plugin-headers

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-plugin-headers - npm Package Compare versions

Comparing version

to
1.0.4

12

Changes.md

@@ -5,12 +5,13 @@

### [1.0.4] - 2023-12-12
- ci: publish updates, shared test actions
- doc(README): formatting
### [1.0.3] - 2022-06-05
#### Added
- feat: instead of early exits, skip registering
- feat: add phish test
- feat(from_phish): check against SPF, DKIM, and ENV FROM
#### Changed
- ci: depends on shared haraka GHA workflows

@@ -34,1 +35,2 @@ - ci(codeclimate): relax some checks

[1.0.3]: https://github.com/haraka/haraka-plugin-headers/releases/tag/1.0.3
[1.0.4]: https://github.com/haraka/haraka-plugin-headers/releases/tag/1.0.4

@@ -76,8 +76,7 @@ // validate message headers and some fields

const failures = [];
for (let i=0; i < singular.length; i++ ) {
if (connection.transaction.header.get_all(singular[i]).length <= 1) {
for (const name of singular) {
if (connection.transaction.header.get_all(name).length <= 1) {
continue;
}
const name = singular[i];
connection.transaction.results.add(plugin, {fail: `duplicate:${name}`});

@@ -226,4 +225,3 @@ failures.push(name);

// for (const h in headers) {}
for (let i=0; i < headers.length; i++) {
const name = headers[i];
for (const name of headers) {
const header = connection.transaction.header.get(name);

@@ -344,4 +342,4 @@ if (!header) continue; // header not present

const rcpts = connection.transaction.rcpt_to;
for (let i=0; i<rcpts.length; i++) {
const rcpt = rcpts[i].address();
for (const rcptElement of rcpts) {
const rcpt = rcptElement.address();
if (rcpt !== del_to) continue;

@@ -380,4 +378,3 @@ connection.transaction.results.add(plugin, {emit: true, fail: 'delivered_to'});

if (!header) { return; } // header not present
for (let i=0; i < mlms[name].length; i++) {
const j = mlms[name][i];
for (const j of mlms[name]) {
if (j.start) {

@@ -384,0 +381,0 @@ if (header.substring(0,j.start.length) === j.start) {

{
"name": "haraka-plugin-headers",
"version": "1.0.3",
"version": "1.0.4",
"description": "Haraka plugin that performs tests on email headers",

@@ -5,0 +5,0 @@ "main": "index.js",

[![CI Tests][ci-img]][ci-url]
[![Code Climate][clim-img]][clim-url]
[![NPM][npm-img]][npm-url]

@@ -4,0 +5,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet