Comparing version 1.0.10 to 1.0.11
@@ -137,6 +137,6 @@ 'use strict'; | ||
if (!recordData?.parsed?.a?.value) { | ||
let assertionValidation = httpsSchema.validate(recordData?.parsed?.l?.value); | ||
if (assertionValidation.error) { | ||
let authorityValidation = httpsSchema.validate(recordData?.parsed?.l?.value); | ||
if (authorityValidation.error) { | ||
response.status.result = 'fail'; | ||
response.status.comment = 'invalid assertion value in dns record'; | ||
response.status.comment = 'invalid authority value in dns record'; | ||
response.info = formatAuthHeaderRow('bimi', response.status); | ||
@@ -154,3 +154,3 @@ return response; | ||
if (recordData?.parsed?.a?.value) { | ||
response.assertion = recordData?.parsed?.a?.value; | ||
response.authority = recordData?.parsed?.a?.value; | ||
} | ||
@@ -157,0 +157,0 @@ |
{ | ||
"name": "mailauth", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Email authentication library for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/mailauth.js", |
@@ -262,6 +262,8 @@ ![](https://github.com/andris9/mailauth/raw/master/assets/mailauth.png) | ||
### BIMI | ||
## BIMI | ||
BIMI information is resolved in the authentication step and the results can be found from the `bimi` property. Message must pass DMARC validation in order to be processed for BIMI. | ||
Brand Indicators for Message Identification (BIMI) support is based on [draft-blank-ietf-bimi-01](https://tools.ietf.org/html/draft-blank-ietf-bimi-01). | ||
BIMI information is resolved in the authentication step and the results can be found from the `bimi` property. Message must pass DMARC validation in order to be processed for BIMI. DMARC policy can not be "none" for BIMI to pass. | ||
```js | ||
@@ -284,2 +286,4 @@ const { bimi } = await authenticate( | ||
> **NB!** Authority Evidence Documents for BIMI are not validated even if these are available. You can get the URL for validating it yourself from `bimi.authority` property. | ||
## Testing | ||
@@ -286,0 +290,0 @@ |
192473
360