From 9ad0cbc19c4fe461d494dd2b8bf8313e0e892770 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 26 Jun 2018 16:59:58 +0200 Subject: [PATCH] configd/templates, idna encode fails when starting with [.], this may not be a complete fix, but seems to resolv the most likely issues. closes https://github.com/opnsense/core/pull/2484 --- src/opnsense/service/modules/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/modules/template.py b/src/opnsense/service/modules/template.py index 5f216099b..6c78d4438 100644 --- a/src/opnsense/service/modules/template.py +++ b/src/opnsense/service/modules/template.py @@ -62,7 +62,7 @@ class Template(object): # register additional filters self._j2_env.filters['decode_idna'] = lambda x:x.decode('idna') - self._j2_env.filters['encode_idna'] = lambda x:x.encode('idna') + self._j2_env.filters['encode_idna'] = lambda x:x.encode('idna') if not x.startswith('.') else x def list_module(self, module_name): """ list single module content