[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master eb2a1e1: Fix Bootstring skew parameter in puny.el
From: |
Lars Ingebrigtsen |
Subject: |
master eb2a1e1: Fix Bootstring skew parameter in puny.el |
Date: |
Mon, 1 Mar 2021 08:05:43 -0500 (EST) |
branch: master
commit eb2a1e1d6c813156cbaa835bde29499f7605ea08
Author: F. Jason Park <jp@neverwas.me>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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. (bug#46838).
---
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 6b3663a..1cdefc08 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -75,7 +75,7 @@ For instance \"xn--bcher-kva\" => \"bücher\"."
(defconst puny-damp 700)
(defconst puny-tmin 1)
(defconst puny-tmax 26)
-(defconst puny-skew 28)
+(defconst puny-skew 38)
;; 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 b37168f..28c0d49 100644
--- a/test/lisp/net/puny-tests.el
+++ b/test/lisp/net/puny-tests.el
@@ -39,10 +39,12 @@
(should (string= (puny-decode-string "xn--9dbdkw") "חנוך")))
(ert-deftest puny-test-encode-domain ()
- (should (string= (puny-encode-domain "åäö.se") "xn--4cab6c.se")))
+ (should (string= (puny-encode-domain "åäö.se") "xn--4cab6c.se"))
+ (should (string= (puny-encode-domain "яндекс.рф") "xn--d1acpjx3f.xn--p1ai")))
(ert-deftest puny-test-decode-domain ()
- (should (string= (puny-decode-domain "xn--4cab6c.se") "åäö.se")))
+ (should (string= (puny-decode-domain "xn--4cab6c.se") "åäö.se"))
+ (should (string= (puny-decode-domain "xn--d1acpjx3f.xn--p1ai") "яндекс.рф")))
(ert-deftest puny-highly-restrictive-domain-p ()
(should (puny-highly-restrictive-domain-p "foo.bar.org"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master eb2a1e1: Fix Bootstring skew parameter in puny.el,
Lars Ingebrigtsen <=