From 1beab72cde0ad6b7a7638cfbdeae3ad2ceeec18a Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sun, 14 Apr 2024 18:12:06 +0200 Subject: [PATCH] DMARC: a small fix for consistency policy selection. --- src/App/Page/Zone.purs | 4 ++-- src/App/Type/DMARC.purs | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/App/Page/Zone.purs b/src/App/Page/Zone.purs index 5440da4..ac07a6a 100644 --- a/src/App/Page/Zone.purs +++ b/src/App/Page/Zone.purs @@ -559,9 +559,9 @@ render state , Bulma.hr , Bulma.div_content [Bulma.explanation Explanations.dmarc_adkim] - , Bulma.selection_field "idDMARCadkim" "Consistency Policy for DKIM" DMARC_adkim DMARC.consistency_policies_txt_dkim (maybe "-" show state.dmarc.adkim) + , Bulma.selection_field "idDMARCadkim" "Consistency Policy for DKIM" DMARC_adkim DMARC.consistency_policies_txt (maybe "-" show state.dmarc.adkim) , Bulma.div_content [Bulma.explanation Explanations.dmarc_aspf] - , Bulma.selection_field "idDMARCaspf" "Consistency Policy for SPF" DMARC_aspf DMARC.consistency_policies_txt_spf (maybe "-" show state.dmarc.aspf) + , Bulma.selection_field "idDMARCaspf" "Consistency Policy for SPF" DMARC_aspf DMARC.consistency_policies_txt (maybe "-" show state.dmarc.aspf) , Bulma.hr , Bulma.div_content [Bulma.explanation Explanations.dmarc_pct] diff --git a/src/App/Type/DMARC.purs b/src/App/Type/DMARC.purs index 0d1d88b..d83be74 100644 --- a/src/App/Type/DMARC.purs +++ b/src/App/Type/DMARC.purs @@ -164,21 +164,13 @@ data ConsistencyPolicy consistency_policies :: Array ConsistencyPolicy consistency_policies = [Strict, Relaxed] -consistency_policies_txt_spf :: Array String -consistency_policies_txt_spf +consistency_policies_txt :: Array String +consistency_policies_txt = [ "Do not provide policy advice" - , "Strict: identical domains" - , "Relaxed: same organizational domain" + , "Strict" + , "Relaxed" ] -consistency_policies_txt_dkim :: Array String -consistency_policies_txt_dkim - = [ "Do not provide policy advice" - , "Strict: same domain" - , "Relaxed: same organizational domain" - ] - - -- | Codec for just encoding a single value of type `ConsistencyPolicy`. codecConsistencyPolicy :: CA.JsonCodec ConsistencyPolicy codecConsistencyPolicy