Univention Bugzilla – Attachment 7714 Details for
Bug 41423
Add LDAP DN Sanitizer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
41423.patch (text/plain), 1.03 KB, created by
Florian Best
on 2016-06-02 15:00 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-06-02 15:00 CEST
Size:
1.03 KB
patch
obsolete
>diff --git a/management/univention-management-console/src/univention/management/console/modules/sanitizers.py b/management/univention-management-console/src/univention/management/console/modules/sanitizers.py >index 1c511ef..e7beab5 100644 >--- a/management/univention-management-console/src/univention/management/console/modules/sanitizers.py >+++ b/management/univention-management-console/src/univention/management/console/modules/sanitizers.py >@@ -589,6 +589,20 @@ def _sanitize(self, value, name, further_args): > return value > > >+class DNSanitizer(StringSanitizer): >+ >+ ''' DNSanitizer is a sanitizer that checks if the value has correct LDAP >+ Distinguished Name syntax ''' >+ >+ def _sanitize(self, value, name, further_args): >+ value = super(DNSanitizer, self)._sanitize(value, name, further_args) >+ try: >+ ldap.dn.str2dn(value) >+ except ldap.DECODING_ERROR: >+ self.raise_validation_error(_('Value is not a LDAP DN.')) >+ return value >+ >+ > class EmailSanitizer(StringSanitizer): > > ''' EmailSanitizer is a very simple sanitizer that checks
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 41423
: 7714