From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request Date: Thu, 11 Aug 2016 15:00:55 +0200 Message-ID: References: <7fb3540a-7b74-68cf-2c63-66474de26640@yandex.ru> <83mvkvmbv2.fsf@gnu.org> <27168f12-32d2-cb38-45c0-27d3339c75aa@yandex.ru> <83twf0lb5s.fsf@gnu.org> <83lh07i6g3.fsf@gnu.org> <83k2fri5kc.fsf@gnu.org> <87oa53i3si.fsf@linux-m68k.org> <83bn13i2x2.fsf@gnu.org> <87fuqfhy0q.fsf@linux-m68k.org> <837fbqise6.fsf@gnu.org> <834m6uhu87.fsf@gnu.org> <65f6508f-a464-7f66-fd14-1372dce86aa7@yandex.ru> <83bn10hetr.fsf@gnu.org> <50426141-3483-e5e4-a252-20b1198cde30@yandex.ru> <874m6rjwdt.fsf_-_@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470920550 19899 195.159.176.226 (11 Aug 2016 13:02:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 13:02:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: stakemorii@gmail.com, schwab@linux-m68k.org, 24117@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 15:02:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXpct-0004xj-R7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 15:02:23 +0200 Original-Received: from localhost ([::1]:48508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpcq-0001kj-SE for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 09:02:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpcd-0001hl-Hx for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:02:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXpcY-0004pu-Hy for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:02:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpcY-0004pp-EV for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXpcY-00068I-61 for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 13:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24117-submit@debbugs.gnu.org id=B24117.147092050423546 (code B ref 24117); Thu, 11 Aug 2016 13:02:02 +0000 Original-Received: (at 24117) by debbugs.gnu.org; 11 Aug 2016 13:01:44 +0000 Original-Received: from localhost ([127.0.0.1]:53165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXpcF-00067i-Ud for submit@debbugs.gnu.org; Thu, 11 Aug 2016 09:01:44 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:39187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXpcC-00064Q-8S for 24117@debbugs.gnu.org; Thu, 11 Aug 2016 09:01:42 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bXpc6-00023I-S5; Thu, 11 Aug 2016 15:01:38 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEX+0Nz+x9X+y9jcp7OH Ymv+xNK/3UY+AAACNUlEQVQ4jW1US7KbMBBUgd8+Ix57NC72NpIO8KxhHxl0/6ukRwLiVKXLaEHT 823LOMoFsI6dcwx0BsdkjCsV5CzRaJVRwhjTBJuP0Q8e2OLUqcDQWBXrz5qG8JOiLF2ngotIlfDP tEyfxLauKW2IlPxD4wCZlMiZqGSX2XJ3EWOGCMSYnWXH5iRsjaWKsuHk6dBYLvgYDwVJYUGDU1cV eDOSYksiq+fpJJgJXTseAxS7X44MIEgJsgMIxPIX4ahhWL0knxKfBFEm65wN3qtALiLXoVpOcRDE EmQ/qtLagRT9CkG4FNqadXZOfo+jeLF89aE57D34IAVZ3nwMJWuskYY9olyR3bLBSEDlVi+2V3ML a+9V4UipOwivGu7ayjFEq8QgUZA6yXs+6sU0GlFSbfHtzLFaqvOFYos+f2tVSMOqaEOXWErI+/7W LartyBXKqlhLkGeQugUlNAOeQX7GOJIk1mKsKmZ8wnTHzAWtow9uCowQC3Rzffst8j4Jq56B1dHF OOsSL4KrxTtJabljvX7h+ndQhTb6JSGFuMm+LlxhDtPfZI+wrtyr2+u4GtHL7WHMHr5jMo2Y2i77 2/wyxu/PF3ewnCqakfythyLcHt78i6m/P0zX96/eHC458dUtKn/Vr66jMr8N1v1JnEokNfw3RHWE GsOg7OkjvK5rqrtpF8IHwXPB9TC3C8Jmcu5XJeDCeiOkenq43j+qSxy1q8IfJ35LVcAJLcwJWJYw 8W4s/8Gb/wBwqJtm38VVOgAAAABJRU5ErkJggg== In-Reply-To: <874m6rjwdt.fsf_-_@lifelogs.com> (Ted Zlatanov's message of "Thu, 11 Aug 2016 08:57:50 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122071 Archived-At: Ted Zlatanov writes: > Somewhat related: it would be nice if the URL parser also listed the > non-ASCII scripts used in the domain name. Then eww and other programs > could do one of the typical defenses: either ensure only one script is > used; or allow only scripts that match the user's locale; or catch any > non-ASCII domain names. Typically they'd use Punycode to display such > suspicious domain names: > https://en.wikipedia.org/wiki/IDN_homograph_attack This is implemented in puny and eww: ;; Check whether the domain only uses "Highly Restricted" Unicode ;; IDNA characters. If not, transform to punycode to indicate that ;; there may be funny business going on. (let ((parsed (url-generic-parse-url url))) (unless (puny-highly-restrictive-domain-p (url-host parsed)) (setf (url-host parsed) (puny-encode-domain (url-host parsed))) (setq url (url-recreate-url parsed)))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no