Univention Bugzilla – Attachment 5854 Details for
Bug 34478
Password complexity check triggers error in s4connector and prevents user sync
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug34478_password_complexity.patch
bug34478_password_complexity.patch (text/plain), 1.08 KB, created by
Stefan Gohmann
on 2014-04-06 10:15:59 CEST
(
hide
)
Description:
bug34478_password_complexity.patch
Filename:
MIME Type:
Creator:
Stefan Gohmann
Created:
2014-04-06 10:15:59 CEST
Size:
1.08 KB
patch
obsolete
>Index: modules/univention/s4connector/__init__.py >=================================================================== >--- modules/univention/s4connector/__init__.py (Revision 48942) >+++ modules/univention/s4connector/__init__.py (Arbeitskopie) >@@ -63,12 +63,27 @@ > if type(mlValue) == type([]): > return [make_lower(x) for x in mlValue] > return mlValue >- >+ >+password_charsets = [ >+ 'abcdefghijklmnopqrstuvwxyz', >+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', >+ '0123456789', >+ '^!\$%&/()=?{[]}+~#-_.:,;<>|\\', >+ ] >+ >+def generate_strong_password(length=20): >+ pwd = [] >+ charset = random.choice(password_charsets) >+ while len(pwd) < length: >+ pwd.append(random.choice(charset)) >+ charset = random.choice(list(set(password_charsets) - set([charset]))) >+ return "".join(pwd) >+ > def set_ucs_passwd_user(s4connector, key, ucs_object): > ''' > set random password to fulfill required values > ''' >- ucs_object['password'] = str(int(random.random()*100000000))*8 # at least 8 characters >+ ucs_object['password'] = generate_strong_password() > > def check_ucs_lastname_user(s4connector, key, ucs_object): > '''
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 34478
:
5852
|
5853
| 5854