From 0c450321784a050114403ec36eb156eb3042f0d1 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Fri, 22 Oct 2010 18:02:47 +0000 Subject: [PATCH] validation.py: enhance IDN-check Previously olny IDN hostnames which starts with xn-- was allowed, now subdomains like subdomains.xn--foobar.i2p are also allowed. --- web/lib/validation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/validation.py b/web/lib/validation.py index c355e3d..13a89f7 100644 --- a/web/lib/validation.py +++ b/web/lib/validation.py @@ -39,7 +39,7 @@ def validate_hostname(data): if re.search(r'(\.-)|(-\.)', namepart): raise forms.ValidationError('Hostname contain ".-" or "-."') # Must not contain '--' except in 'xn--' for IDN - if re.search(r'(?