From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request Date: Thu, 11 Aug 2016 09:18:31 -0400 Organization: =?UTF-8?Q?=D0=A2=D0=B5=D0=BE=D0=B4=D0=BE=D1=80_?= =?UTF-8?Q?=D0=97=D0=BB=D0=B0=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= @ Cienfuegos Message-ID: <87shubiguw.fsf@lifelogs.com> References: <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 1470921676 14714 195.159.176.226 (11 Aug 2016 13:21:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 13:21:16 +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, Dmitry Gutov To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 15:21:08 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 1bXpv2-0003a4-Dk for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 15:21:08 +0200 Original-Received: from localhost ([::1]:48569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpuz-00038r-A4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 09:21:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpt6-0001ve-1p for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:19:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXpt1-0000JQ-Df for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:19:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXpt0-0000JF-H5 for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXpt0-0006Zs-8M for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 09:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ted Zlatanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 13:19: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.147092153225264 (code B ref 24117); Thu, 11 Aug 2016 13:19:02 +0000 Original-Received: (at 24117) by debbugs.gnu.org; 11 Aug 2016 13:18:52 +0000 Original-Received: from localhost ([127.0.0.1]:53178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXpsm-0006ZM-Lv for submit@debbugs.gnu.org; Thu, 11 Aug 2016 09:18:52 -0400 Original-Received: from mail-pa0-f42.google.com ([209.85.220.42]:34542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXpsh-0006Z2-P2 for 24117@debbugs.gnu.org; Thu, 11 Aug 2016 09:18:47 -0400 Original-Received: by mail-pa0-f42.google.com with SMTP id fi15so974965pac.1 for <24117@debbugs.gnu.org>; Thu, 11 Aug 2016 06:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google; h=from:to:cc:subject:organization:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=Cku0rzR5RJAWSap8540AhRHv5HzIjfYS5R/MZSQY1+k=; b=orzCxOYuDgIjEqt2gD8bqolLOS/aBublZLM/OdsZJkuR/IB/TRnQyGuSbZcap0UWMy +hDb1pIJM/Jxhxywscu9Xa8BvsRf8QSnKfYmU7qWcHgmQZJV+3WFXKxUg53ADGcVqxc2 bZS2YDzXeBkATp4S8XBdjY+K2u+jFX97V67Vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :user-agent:mime-version; bh=Cku0rzR5RJAWSap8540AhRHv5HzIjfYS5R/MZSQY1+k=; b=DM0FmOZR7dSbla+6jhrLuJWNebYyCv6FyQ5ObckxRWOTYzMcTA6LkQaWfowcvg4pCR z5fVHbKRuDe1SAU2ArR1qEpV1pctRtl25KQ7rYQrtDQfq06da4aH2YR1mDoGd7zxL2H9 9kCUgq0xvDXVJoxQ6Izz0OTtlbKnOsDDwhJRVdzzvSmj3QkUVTAa5ugw9bMUD4icSPbZ lEEVjFWz38TV1P3/Bz9Y91J4gYDLsI6EuRqtetqHnjTDbEL+f+TMym921kRmEzX0895b +vyBW31HrJo2SkjduT/t5m80jXtYmq473X04n5baKaFsS58w2i0FMcnSdjCvOeYpgw4a xXtw== X-Gm-Message-State: AEkoouuKON0hECd3EItyk1i18G1iv9fFfI2GCQXhQe1R6ODcFkTYaAOhCalJMtMkoRqbDA== X-Received: by 10.66.2.135 with SMTP id 7mr16789903pau.136.1470921518083; Thu, 11 Aug 2016 06:18:38 -0700 (PDT) Original-Received: from flea (c-98-229-60-157.hsd1.ma.comcast.net. [98.229.60.157]) by smtp.gmail.com with ESMTPSA id vt10sm5451037pab.43.2016.08.11.06.18.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 06:18:37 -0700 (PDT) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 11 Aug 2016 15:00:55 +0200") 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:122073 Archived-At: On Thu, 11 Aug 2016 15:00:55 +0200 Lars Ingebrigtsen wrote: LI> 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 LI> This is implemented in puny and eww: LI> ;; Check whether the domain only uses "Highly Restricted" Unicode LI> ;; IDNA characters. If not, transform to punycode to indicate that LI> ;; there may be funny business going on. LI> (let ((parsed (url-generic-parse-url url))) LI> (unless (puny-highly-restrictive-domain-p (url-host parsed)) LI> (setf (url-host parsed) (puny-encode-domain (url-host parsed))) LI> (setq url (url-recreate-url parsed)))) Awesome! Thanks for pointing this out, and sorry for digressing. Ted