[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master ce63f91025: Add textsec functions for verifying email address
From: |
Eli Zaretskii |
Subject: |
Re: master ce63f91025: Add textsec functions for verifying email addresses |
Date: |
Thu, 20 Jan 2022 13:29:40 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> Date: Thu, 20 Jan 2022 12:08:35 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> (insert "Lars Ingebrigtsen\N{RIGHT-TO-LEFT OVERRIDE}" "larsi@gnus.org")
> >>
> >> Boom.
> >
> > Then you must pass the entire concatenated string to the function. Or
> > call it on buffer text after inserting the string there. This
> > function must see the characters affected by the bidi controls, to
> > tell whether the control do any harm.
>
> I see. Perhaps we should have another function in addition -- one that
> says "does this string (if inserted into a buffer) possibly affect other
> text"? I.e., "does it have dangling directional modifiers"? I think
> that's really what we want here (and why the Unicode recommendations are
> like they are in this area).
The problem is that the answer to that question depends on the
following text. E.g., if RIGHT-TO-LEFT OVERRIDE is followed by R2L
characters, they will not be affected.
We could try appending some representative text to the string being
tested, of course. For example, append a fixed string like this:
a1א:!
and see if the function returns non-nil position that points to one of
those characters; if so, consider the original string "unsafe".
Would that be good enough for textsec purposes?
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Po Lu, 2022/01/18
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Eli Zaretskii, 2022/01/18
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Eli Zaretskii, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Eli Zaretskii, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses,
Eli Zaretskii <=
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/20
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Eli Zaretskii, 2022/01/22
- Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/22
Re: master ce63f91025: Add textsec functions for verifying email addresses, Lars Ingebrigtsen, 2022/01/20