From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master ce63f91025: Add textsec functions for verifying email addresses Date: Sat, 22 Jan 2022 12:01:10 +0200 Message-ID: <83zgnom6mx.fsf@gnu.org> References: <164250841214.433.17670666873471731764@vcs2.savannah.gnu.org> <20220118122012.7A3A4C0DA1B@vcs2.savannah.gnu.org> <87ee555fy8.fsf@yahoo.com> <8335lkvqas.fsf@gnu.org> <871r127pzl.fsf@gnus.org> <83czkmrbha.fsf@gnu.org> <87ee524u0j.fsf@gnus.org> <838rvar9n0.fsf@gnu.org> <874k5y3brg.fsf@gnus.org> <834k5yr6fv.fsf@gnu.org> <87r1921snz.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 22 11:02:26 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nBDE1-0005ze-Fy for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Jan 2022 11:02:25 +0100 Original-Received: from localhost ([::1]:43128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBDE0-0003Mf-BD for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Jan 2022 05:02:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBDDI-00020u-G3 for emacs-devel@gnu.org; Sat, 22 Jan 2022 05:01:41 -0500 Original-Received: from [2001:470:142:3::e] (port=48552 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBDDB-0002FV-DZ; Sat, 22 Jan 2022 05:01:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=CjliFOwc0JAkE8WuEaiJu4reebh7eSKR7wdCRTVDd4s=; b=KUIo5/2Du84VeEhXhsvn 0W8uOOul8jvhhZVeLczVgvaWrh0GLoVGpRhe54eAVoBQkiMKTvV9YeLu0E1K2pmqk5HIipXCaDVwk fl0LgJaovRnmdSuo6jXcyJznVbIFPcsxhyIUosE4QCQ6Lr4/iCCJRkdvuDd2Fl0WnAvytYZ5bPtv7 RXQa370iMX4EGBEAgXYiPdEZNK8zly5qrbCFcUKdIeRm2iR3Bu8u4dY8xpmgJAmBV5qOQyQutab7g //FUZQGUDpZVlZIM/qnJVGk/DJZfygS3Eh1ARvAvnVnNVNkz5j9KJXQG0Bh6sUr7o1kB+ZUUvHWy+ PXC4+XG6K/5vWA==; Original-Received: from [87.69.77.57] (port=1611 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBDD8-0004OK-4m; Sat, 22 Jan 2022 05:01:33 -0500 In-Reply-To: <87r1921snz.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 20 Jan 2022 13:46:24 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285185 Archived-At: > From: Lars Ingebrigtsen > Cc: luangruo@yahoo.com, emacs-devel@gnu.org > Date: Thu, 20 Jan 2022 13:46:24 +0100 > > > 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? > > Sounds good to me. It should probably be baked into its own utility > function, so that other people that wonder about strings they have > doesn't have to know anything about these things. Now done, see the new function textsec-bidi-controls-suspicious-p. Feel free to tweak as needed, if the API is not convenient.