From 10025a5dbaf4707d5f2f20c3277f7016f300a48e Mon Sep 17 00:00:00 2001 From: jomae Date: Fri, 4 Oct 2024 14:27:21 +0000 Subject: [PATCH] 1.6.1dev: avoid unicode digits in domain part of email address in wiki formatting (closes #13790) git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17857 af82e41b-90c4-0310-8c96-b1721e28e2e2 --- trac/notification/mail.py | 2 +- trac/wiki/tests/wiki-tests.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/trac/notification/mail.py b/trac/notification/mail.py index 95a2768391..9482d3c5ad 100644 --- a/trac/notification/mail.py +++ b/trac/notification/mail.py @@ -59,7 +59,7 @@ r"[a-zA-Z0-9.'+_-]+" '@' # the domain name part (RFC:1035) r'(?:[a-zA-Z0-9_-]+\.)+' # labels (but also allow '_') - r'[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?' # TLD + r'[a-zA-Z](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?' # TLD ) _mime_encoding_re = re.compile(r'=\?[^?]+\?[bq]\?[^?]+\?=', re.IGNORECASE) diff --git a/trac/wiki/tests/wiki-tests.txt b/trac/wiki/tests/wiki-tests.txt index 899795da8c..233931610a 100644 --- a/trac/wiki/tests/wiki-tests.txt +++ b/trac/wiki/tests/wiki-tests.txt @@ -429,6 +429,10 @@ trac+devel@another-site.fr, T_r+a-c1.23@yet_another-site.edu.au !not@an.email.com someone@louvre.museum- +local@exa६ple.org (U+096c) +local@example.or೬ (U+0cec) +local@example.o6g (U+ff16) +local@example.or𝟨 (U+1d7e8) ------------------------------

Author: mailto:cboos@edgewall.org, @@ -440,6 +444,10 @@ i.e. T_r+a-c1.23@yet_another-site.edu.au not@an.email.com someone@louvre.museum- +local@exa६ple.org (U+096c) +local@example.or೬ (U+0cec) +local@example.o6g (U+ff16) +local@example.or𝟨 (U+1d7e8)

------------------------------ ============================== Arbitrary protocol Link