Changeset - 335b55caa81d
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-02-14 22:30:40
marcin@python-works.com
#355 replaced stored LDAP password with some random generated one
1 file changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/auth.py
Show inline comments
 
@@ -224,8 +224,13 @@ def authenticate(username, password):
 
                 'lastname': safe_unicode(get_ldap_attr('ldap_attr_lastname')),
 
                 'email': get_ldap_attr('ldap_attr_email'),
 
                }
 

	
 
                if user_model.create_ldap(username, password, user_dn,
 
                
 
                # don't store LDAP password since we don't need it. Override 
 
                # with some random generated password
 
                _password = PasswordGenerator().gen_password(length=8)
 
                # create this user on the fly if it doesn't exist in rhodecode
 
                # database
 
                if user_model.create_ldap(username, _password, user_dn,
 
                                          user_attrs):
 
                    log.info('created new ldap user %s' % username)
 

	
0 comments (0 inline, 0 general)