unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: emacs-devel@gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master ce63f91025: Add textsec functions for verifying email addresses
Date: Tue, 18 Jan 2022 14:38:05 +0100	[thread overview]
Message-ID: <87lezdp3k2.fsf@gmail.com> (raw)
In-Reply-To: <20220118122012.7A3A4C0DA1B@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Tue, 18 Jan 2022 07:20:12 -0500 (EST)")

>>>>> On Tue, 18 Jan 2022 07:20:12 -0500 (EST), Lars Ingebrigtsen <larsi@gnus.org> said:
    Lars> +(defun textsec-email-suspicious-p (email)
    Lars> +  "Say whether EMAIL looks suspicious.
    Lars> +If it isn't, nil is returned.  If it is, a string explaining the
    Lars> +problem is returned."
    Lars> +  (pcase-let* ((`(,address . ,name) (mail-header-parse-address email t))
    Lars> +               (`(,local ,domain) (split-string address "@")))
    Lars> +    (or
    Lars> +     (textsec-domain-suspicious-p domain)
    Lars> +     (textsec-local-address-suspicious-p local)
    Lars> +     (textsec-name-suspicious-p name))))
    Lars> +
    Lars>  (provide 'textsec)

Does it really matter if the display name of an email address has
possibly confusable characters in it? Itʼs not actually used for
anything except to be displayed to the user.

(as an aside:

(mail-header-parse-address "Robert Pluim rpluim@gmail.com")
=>
("RobertPluimrpluim@gmail.com")

I know thatʼs not a valid format, but the behaviour is somewhat
surprising)

Robert
-- 



  parent reply	other threads:[~2022-01-18 13:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164250841214.433.17670666873471731764@vcs2.savannah.gnu.org>
     [not found] ` <20220118122012.7A3A4C0DA1B@vcs2.savannah.gnu.org>
2022-01-18 13:30   ` master ce63f91025: Add textsec functions for verifying email addresses Po Lu
2022-01-18 18:42     ` Eli Zaretskii
2022-01-20  8:47       ` Lars Ingebrigtsen
2022-01-20  9:40         ` Eli Zaretskii
2022-01-20  9:49           ` Lars Ingebrigtsen
2022-01-20 10:20             ` Eli Zaretskii
2022-01-20 11:08               ` Lars Ingebrigtsen
2022-01-20 11:29                 ` Eli Zaretskii
2022-01-20 12:46                   ` Lars Ingebrigtsen
2022-01-22 10:01                     ` Eli Zaretskii
2022-01-22 11:25                       ` Lars Ingebrigtsen
2022-01-20  8:49       ` Lars Ingebrigtsen
2022-01-20 10:04         ` Eli Zaretskii
2022-01-20 10:07           ` Lars Ingebrigtsen
2022-01-18 13:38   ` Robert Pluim [this message]
2022-01-19 14:37     ` Lars Ingebrigtsen
2022-01-19 14:49       ` Robert Pluim
2022-01-19 14:54         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lezdp3k2.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).