From unknown Mon Aug 18 14:24:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46838 <46838@debbugs.gnu.org> To: bug#46838 <46838@debbugs.gnu.org> Subject: Status: 28.0.50; nonstandard constant value in puny.el sometimes problematic Reply-To: bug#46838 <46838@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:24:04 +0000 retitle 46838 28.0.50; nonstandard constant value in puny.el sometimes prob= lematic reassign 46838 emacs submitter 46838 "J.P." severity 46838 minor tag 46838 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 28 18:52:06 2021 Received: (at submit) by debbugs.gnu.org; 28 Feb 2021 23:52:07 +0000 Received: from localhost ([127.0.0.1]:47544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGVr0-0006cf-Dc for submit@debbugs.gnu.org; Sun, 28 Feb 2021 18:52:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:50122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGVqy-0006cH-Uj for submit@debbugs.gnu.org; Sun, 28 Feb 2021 18:52:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGVqy-00051x-Jm for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 18:52:00 -0500 Received: from mail-109-mta184.mxroute.com ([136.175.109.184]:46047) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGVqv-0002Mc-T8 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 18:52:00 -0500 Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-109-mta184.mxroute.com (ZoneMTA) with ESMTPSA id 177eb09841000008a7.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Sun, 28 Feb 2021 23:46:45 +0000 X-Zone-Loop: b38eae79477ef8133ece9bc11b9a2418205a094b2a1d X-Originating-IP: [149.28.56.236] From: "J.P." To: bug-gnu-emacs@gnu.org Subject: 28.0.50; nonstandard constant value in puny.el sometimes problematic Date: Sun, 28 Feb 2021 15:46:40 -0800 Message-ID: <87im6b7o2n.fsf@neverwas.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AuthUser: masked@neverwas.me Received-SPF: pass client-ip=136.175.109.184; envelope-from=jp@neverwas.me; helo=mail-109-mta184.mxroute.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Severity: minor Tags: patch In rare cases, puny.el appears to convert domains incorrectly (both human to puny and vice versa). The updated tests in the attached patch demonstrate one such case. This may just be a typo because changing `puny-skew' to the value prescribed by RFC3492 [1] makes the issue go away. Converted names then match those returned by libidn and dig. Thanks, J.P. [1] https://tools.ietf.org/html/rfc3492#section-5 In GNU Emacs 28.0.50 (build 2, x86_64-redhat-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0) of 2021-02-28 built on localhost Repository revision: aad8ffafa89fe46ff5d63bd0127274f74019d50f Repository branch: master Windowing system distributor 'Fedora Project', version 11.0.12010000 System Description: Fedora 33 (Workstation Edition) Configured using: 'configure --enable-check-lisp-object-type --enable-checking=yes,glyphs --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O0 -flto=auto -ffat-lto-objects -fexceptions -g3 -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads xwidget-internal dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 51730 6592) (symbols 48 6587 1) (strings 32 18212 1566) (string-bytes 1 606914) (vectors 16 12733) (vector-slots 8 172128 8290) (floats 8 21 38) (intervals 56 336 0) (buffers 992 11)) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Fix-Bootstring-skew-parameter.patch Content-Transfer-Encoding: quoted-printable >From afea12fb0cd4fc62a8dcf3e280de9be871f5fb5b Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 28 Feb 2021 01:17:05 -0800 Subject: [PATCH] Fix Bootstring skew parameter in puny.el * lisp/net/puny.el: change puny-skew to match value given in RFC3492. * test/lisp/net/puny-tests.el (puny-test-encode-domain) (puny-test-decode-domain): add regression case for popular domain. --- lisp/net/puny.el | 2 +- test/lisp/net/puny-tests.el | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 6b3663a5fb2..1cdefc08f02 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -75,7 +75,7 @@ puny-base (defconst puny-damp 700) (defconst puny-tmin 1) (defconst puny-tmax 26) -(defconst puny-skew 28) +(defconst puny-skew 38) =20 ;; 0-25 a-z ;; 26-36 0-9 diff --git a/test/lisp/net/puny-tests.el b/test/lisp/net/puny-tests.el index b37168f5ca7..28c0d49cbee 100644 --- a/test/lisp/net/puny-tests.el +++ b/test/lisp/net/puny-tests.el @@ -39,10 +39,12 @@ puny-test-decode2 (should (string=3D (puny-decode-string "xn--9dbdkw") "=D7=97=D7=A0=D7=95= =D7=9A"))) =20 (ert-deftest puny-test-encode-domain () - (should (string=3D (puny-encode-domain "=C3=A5=C3=A4=C3=B6.se") "xn--4ca= b6c.se"))) + (should (string=3D (puny-encode-domain "=C3=A5=C3=A4=C3=B6.se") "xn--4ca= b6c.se")) + (should (string=3D (puny-encode-domain "=D1=8F=D0=BD=D0=B4=D0=B5=D0=BA= =D1=81.=D1=80=D1=84") "xn--d1acpjx3f.xn--p1ai"))) =20 (ert-deftest puny-test-decode-domain () - (should (string=3D (puny-decode-domain "xn--4cab6c.se") "=C3=A5=C3=A4=C3= =B6.se"))) + (should (string=3D (puny-decode-domain "xn--4cab6c.se") "=C3=A5=C3=A4=C3= =B6.se")) + (should (string=3D (puny-decode-domain "xn--d1acpjx3f.xn--p1ai") "=D1=8F= =D0=BD=D0=B4=D0=B5=D0=BA=D1=81.=D1=80=D1=84"))) =20 (ert-deftest puny-highly-restrictive-domain-p () (should (puny-highly-restrictive-domain-p "foo.bar.org")) --=20 2.29.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 08:05:25 2021 Received: (at 46838) by debbugs.gnu.org; 1 Mar 2021 13:05:25 +0000 Received: from localhost ([127.0.0.1]:48441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiEm-0007FZ-Q9 for submit@debbugs.gnu.org; Mon, 01 Mar 2021 08:05:24 -0500 Received: from quimby.gnus.org ([95.216.78.240]:42186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiEl-0007FM-4r for 46838@debbugs.gnu.org; Mon, 01 Mar 2021 08:05:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RIxGDeH0WgTBkvVm1CPSgbiG/jWnm0FP140eFAyrL0Y=; b=bFmGQfqLLdYU6xsoD8A9ryUOnk 5QhWN9rLWY0hB81uq6BtpG6SC5qlxMQsCslOwW95KzRj2tQKJBYEO3njRr1LU66BFWa1yhH8ccKG8 wmg34/97fWFXmGuJ6ZiD40QQaB5CMTbzoeId4DmM+7fcxq5KMxh++L5Y4lbl4NbX3aMM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGiEc-00021c-Kd; Mon, 01 Mar 2021 14:05:17 +0100 From: Lars Ingebrigtsen To: "J.P." Subject: Re: bug#46838: 28.0.50; nonstandard constant value in puny.el sometimes problematic References: <87im6b7o2n.fsf@neverwas.me> X-Now-Playing: Big Thief's _Two Hands_: "Wolf" Date: Mon, 01 Mar 2021 14:05:13 +0100 In-Reply-To: <87im6b7o2n.fsf@neverwas.me> (J. P.'s message of "Sun, 28 Feb 2021 15:46:40 -0800") Message-ID: <87a6rn81o6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "J.P." writes: > In rare cases, puny.el appears to convert domains incorrectly (both > human to puny and vice versa). The updated tests in the attached patch > demonstrate one such case. This may just be a typo beca [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46838 Cc: 46838@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "J.P." writes: > In rare cases, puny.el appears to convert domains incorrectly (both > human to puny and vice versa). The updated tests in the attached patch > demonstrate one such case. This may just be a typo because changing > `puny-skew' to the value prescribed by RFC3492 [1] makes the issue go > away. Converted names then match those returned by libidn and dig. Thank; looks like a typo to me, too. I've applied your patch to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 08:05:32 2021 Received: (at control) by debbugs.gnu.org; 1 Mar 2021 13:05:32 +0000 Received: from localhost ([127.0.0.1]:48444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiEu-0007Fu-0x for submit@debbugs.gnu.org; Mon, 01 Mar 2021 08:05:32 -0500 Received: from quimby.gnus.org ([95.216.78.240]:42212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiEs-0007Fi-H2 for control@debbugs.gnu.org; Mon, 01 Mar 2021 08:05:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XOukrGRnFHDP7EsBj28wDwhGJumZsp6CYKhVTfdWINE=; b=fneLL2egoa7tK2UiwwT7b//qIw lUuT04zlQPpjwiXVnzXXp8Q9/4GCqcmAuvVDj1rOohT2ac3ZrkROBC8/BtEW5qOAcV0DcobXjVBB4 WT3IkXMfk+N8LJ/BKwIWC4sLDnqG7WlXB4IbImobN6kh/ZmDtsrSLP6jEuNL387X7rrE=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGiEl-00021j-1D for control@debbugs.gnu.org; Mon, 01 Mar 2021 14:05:25 +0100 Date: Mon, 01 Mar 2021 14:05:21 +0100 Message-Id: <878s7781ny.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46838 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 46838 fixed close 46838 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 46838 fixed close 46838 28.1 quit From unknown Mon Aug 18 14:24:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 30 Mar 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator