Univention Bugzilla – Attachment 3627 Details for
Bug 19557
Nameserver der Reverse-Zone mit Punkt am Ende
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch für 3.0
diff3.0.txt (text/plain), 1.63 KB, created by
Florian Best
on 2011-10-13 10:22:07 CEST
(
hide
)
Description:
patch für 3.0
Filename:
MIME Type:
Creator:
Florian Best
Created:
2011-10-13 10:22:07 CEST
Size:
1.63 KB
patch
obsolete
>diff -ur admin.o//handlers/dns/forward_zone.py admin/handlers/dns/forward_zone.py >--- admin.o//handlers/dns/forward_zone.py 2011-10-13 10:08:22.000000000 +0200 >+++ admin/handlers/dns/forward_zone.py 2011-10-13 09:29:52.000000000 +0200 >@@ -58,7 +58,7 @@ > 'zone': univention.admin.property( > short_description=_('Zone name'), > long_description='', >- syntax=univention.admin.syntax.string, >+ syntax=univention.admin.syntax.dnsZone, > multivalue=0, > options=[], > required=1, >diff -ur admin.o//syntax.py admin/syntax.py >--- admin.o//syntax.py 2011-10-13 10:08:43.000000000 +0200 >+++ admin/syntax.py 2011-10-13 10:05:28.000000000 +0200 >@@ -1027,6 +1027,22 @@ > return text > raise univention.admin.uexceptions.valueError,_("The name of a reverse zone consists of the reversed subnet address followed by .in-addr.arpa. Example: \"0.168.192.in-addr.arpa\"") > >+class dnsZone(simple): >+ _re = re.compile(r'^[a-zA-Z](:?(:?[a-zA-Z0-9-]{0,63})*\.?)*[a-zA-Z0-9]$') >+ >+ @classmethod >+ def parse(self, text): >+ if text is None: >+ raise univention.admin.uexceptions.valueError(_("Missing value!")) >+ if len(text) >= 255: >+ raise univention.admin.uexceptions.valueError(_("Value may not be longer than 255 chars!")) >+ if self._re.match(text) is not None: >+ return text >+ elif max(map(len, text.split('.'))) >= 63: >+ raise univention.admin.uexceptions.valueError(_("Value may not longer than 63 chars between dots!")) >+ >+ raise univention.admin.uexceptions.valueError(_("Value may not contain other than numbers, letters and dots and may not end with a dot!")) >+ > class dnsName(simple): > _re = re.compile('^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9.]$') >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19557
:
3626
|
3627
|
3628
|
3629