Univention Bugzilla – Attachment 8026 Details for
Bug 42313
ucsschool-import: remove illegal characters from username
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch (did not consider case insensitivity), attachment 8027 on Bug #42478 is a rewrite
42313-2.patch (text/plain), 982 bytes, created by
Florian Best
on 2016-09-22 13:28:39 CEST
(
hide
)
Description:
patch (did not consider case insensitivity), attachment 8027 on Bug #42478 is a rewrite
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-09-22 13:28:39 CEST
Size:
982 bytes
patch
obsolete
>diff --git a/ucs-school-import/modules/ucsschool/importer/utils/username_handler.py b/ucs-school-import/modules/ucsschool/importer/utils/username_handler.py >index b30c101..120b618 100644 >--- a/ucs-school-import/modules/ucsschool/importer/utils/username_handler.py >+++ b/ucs-school-import/modules/ucsschool/importer/utils/username_handler.py >@@ -42,13 +42,14 @@ from ucsschool.importer.utils.logging import get_logger > > > class UsernameHandler(object): >- replacement_variable_pattern = re.compile(r"\[.*?\]") >+ > allowed_chars = string.ascii_letters + string.digits + "." > > def __init__(self, username_max_length): > self.username_max_length = username_max_length > self.logger = get_logger() > self.connection, self.position = get_admin_connection() >+ self.replacement_variable_pattern = re.compile(r'\[(%s)\]' % '|'.join(map(re.escape, self.counter_variable_to_function.keys()))) > > def add_to_ldap(self, username, first_number): > assert isinstance(username, basestring)
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 42313
:
8025
|
8026