emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 696bd360f6: Deconfuse textsec doc strings slightly


From: Lars Ingebrigtsen
Subject: master 696bd360f6: Deconfuse textsec doc strings slightly
Date: Wed, 19 Jan 2022 05:35:01 -0500 (EST)

branch: master
commit 696bd360f63ac067d4fb37c2295e10524709cd32
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Deconfuse textsec doc strings slightly
    
    * lisp/international/textsec.el (textsec-name-suspicious-p):
    (textsec-domain-suspicious-p):
    (textsec-local-address-suspicious-p):
    (textsec-name-suspicious-p):
    (textsec-suspicious-nonspacing-p):
    (textsec-email-suspicious-p): Suspiciosness isn't only about
    homoglyphs, so don't claim so in the doc strings.
---
 lisp/international/textsec.el | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el
index 4b6620051d..51111f5e77 100644
--- a/lisp/international/textsec.el
+++ b/lisp/international/textsec.el
@@ -233,9 +233,11 @@ The scripts are as defined by the Unicode Standard Annex 
24 (UAX#24)."
   "Say whether DOMAIN's name looks suspicious.
 Return nil if it isn't suspicious.  If it is, return a string explaining
 the potential problem.
+
 Domain names are considered suspicious if they use characters
 that can look similar to other characters when displayed, or that
-are not allowed by Unicode's IDNA mapping."
+are not allowed by Unicode's IDNA mapping, or are certain other
+non-usual mixtures of characters."
   (catch 'found
     (seq-do
      (lambda (char)
@@ -253,8 +255,10 @@ LOCAL is the bit before \"@\" in an email address.
 
 If it isn't suspicious, return nil.  If it is, return a string explaining
 the potential problem.
+
 Email addresses are considered suspicious if they use characters
-that can look similar to other characters when displayed."
+that can look similar to other characters when displayed, or are
+certain other non-usual mixtures of characters."
   (cond
    ((not (equal local (ucs-normalize-NFKC-string local)))
     (format "`%s' is not in normalized format `%s'"
@@ -273,8 +277,10 @@ email address.
 
 If it isn't suspicious, return nil.  If it is, return a string
 explaining the potential problem.
-Names are considered suspicious if they use characters that
-can look similar to other characters when displayed."
+
+Names are considered suspicious if they use characters that can
+look similar to other characters when displayed, or are certain
+other non-usual mixtures of characters."
   (cond
    ((not (equal name (ucs-normalize-NFC-string name)))
     (format "`%s' is not in normalized format `%s'"
@@ -293,6 +299,7 @@ can look similar to other characters when displayed."
   "Say whether STRING uses nonspacing characters in suspicious ways.
 If it doesn't, return nil.  If it does, return a string explaining
 the potential problem.
+
 Use of nonspacing characters is considered suspicious if there are
 two or more consecutive identical nonspacing characters, or too many
 consecutive nonspacing characters."
@@ -321,6 +328,7 @@ consecutive nonspacing characters."
   "Say whether EMAIL address looks suspicious.
 If it isn't, return nil.  If it is, return a string explaining the
 potential problem.
+
 An email address is considered suspicious if either of its 3 parts:
 domain, local, or name -- are found to be suspicious by, respectively,
 `textsec-domain-suspicious-p', `textsec-local-address-suspicious-p',



reply via email to

[Prev in Thread] Current Thread [Next in Thread]