New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mailauth

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailauth - npm Package Compare versions

Comparing version 4.6.7 to 4.6.8

7

CHANGELOG.md
# Changelog
## [4.6.8](https://github.com/postalsys/mailauth/compare/v4.6.7...v4.6.8) (2024-06-04)
### Bug Fixes
* **dmarc-alignment:** Fixed tldts usage to allow private domains ([cc7dfa8](https://github.com/postalsys/mailauth/commit/cc7dfa8d820c1a4112602340192010354d51cd52))
## [4.6.7](https://github.com/postalsys/mailauth/compare/v4.6.6...v4.6.7) (2024-05-30)

@@ -4,0 +11,0 @@

5

lib/dmarc/get-dmarc-record.js
'use strict';
const dns = require('node:dns').promises;
const tldts = require('tldts');
const dns = require('node:dns').promises;
const { TLDTS_OPTS } = require('../tools');

@@ -36,3 +37,3 @@ const resolveTxt = async (domain, resolver) => {

if (!txt) {
let orgDomain = tldts.getDomain(domain);
let orgDomain = tldts.getDomain(domain, TLDTS_OPTS);
if (orgDomain !== domain) {

@@ -39,0 +40,0 @@ // try org domain as well

4

lib/dmarc/verify.js

@@ -6,3 +6,3 @@ 'use strict';

const tldts = require('tldts');
const { formatAuthHeaderRow, getAlignment } = require('../tools');
const { formatAuthHeaderRow, getAlignment, TLDTS_OPTS } = require('../tools');
const getDmarcRecord = require('./get-dmarc-record');

@@ -45,3 +45,3 @@

let orgDomain = tldts.getDomain(domain);
let orgDomain = tldts.getDomain(domain, TLDTS_OPTS);

@@ -48,0 +48,0 @@ let status = {

@@ -32,2 +32,7 @@ /* eslint no-control-regex: 0 */

const TLDTS_OPTS = {
allowIcannDomains: true,
allowPrivateDomains: true
};
const writeToStream = async (stream, input, chunkSize) => {

@@ -487,3 +492,3 @@ chunkSize = chunkSize || 64 * 1024;

for (let entry of domainList) {
let domain = formatDomain(tldts.getDomain(entry.domain) || entry.domain);
let domain = formatDomain(tldts.getDomain(entry.domain, TLDTS_OPTS) || entry.domain);
if (formatDomain(domain) === fromDomain) {

@@ -496,5 +501,5 @@ return entry;

// match org domains
fromDomain = formatDomain(tldts.getDomain(fromDomain) || fromDomain);
fromDomain = formatDomain(tldts.getDomain(fromDomain, TLDTS_OPTS) || fromDomain);
for (let entry of domainList) {
let domain = formatDomain(tldts.getDomain(entry.domain) || entry.domain);
let domain = formatDomain(tldts.getDomain(entry.domain, TLDTS_OPTS) || entry.domain);
if (domain === fromDomain) {

@@ -597,3 +602,5 @@ return entry;

getCurTime
getCurTime,
TLDTS_OPTS
};
{
"name": "mailauth",
"version": "4.6.7",
"version": "4.6.8",
"description": "Email authentication library for Node.js",

@@ -44,3 +44,3 @@ "main": "lib/mailauth.js",

"marked-man": "0.7.0",
"mbox-reader": "1.1.5",
"mbox-reader": "1.2.0",
"mocha": "10.4.0"

@@ -56,3 +56,3 @@ },

"punycode.js": "2.3.1",
"tldts": "6.1.23",
"tldts": "6.1.24",
"undici": "5.28.4",

@@ -59,0 +59,0 @@ "uuid": "9.0.1",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc