Univention Bugzilla – Attachment 8117 Details for
Bug 34420
Univention-directory-logger: undetectable base64 encoding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
34420.diff
file_34420.txt (text/plain), 1.45 KB, created by
Philipp Hahn
on 2016-10-17 14:30:06 CEST
(
hide
)
Description:
34420.diff
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2016-10-17 14:30:06 CEST
Size:
1.45 KB
patch
obsolete
>diff --git a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >index 425b2f3..24d29d7 100755 >--- a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >+++ b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >@@ -32,7 +32,6 @@ > > __package__ = '' # workaround for PEP 366 > import listener >-import string > import time > import syslog > import re >@@ -69,22 +68,17 @@ filemode = '0640' > cleanupDellog = True # remove missed dellog entries (after reporting about them) > digest = listener.configRegistry.get('ldap/logging/hash', 'md5') > >- >-def needsConversion(char): >- return char > '\x7f' >- >- >-def base64Filter(str): >- if [char for char in str if needsConversion(char)]: >- str = string.rstrip(base64.encodestring(str)) >- return str >+SAFE_STRING_RE = re.compile(r'^(?:\000|\n|\r| |:|<)|[\000\n\r\200-\377]+|[ ]+$') > > > def ldapEntry2string(entry): >- str = '' >- for (key, valuelist) in entry.iteritems(): >- str += ''.join(['%s: %s\n' % (key, base64Filter(value)) for value in valuelist]) >- return str >+ return ''.join( >+ '%s:: %s\n' % (key, base64.standard_b64encode(value)) >+ if SAFE_STRING_RE.search(value) else >+ '%s: %s\n' % (key, value) >+ for key, values in entry.iteritems() >+ for value in values >+ ) > > > def ldapTime2string(timestamp):
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 34420
:
8006
|
8008
|
8044
|
8089
| 8117