allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [08/11] git commit: [#7388] provide default new config values
Date Fri, 23 May 2014 17:55:01 GMT
[#7388] provide default new config values


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a6baa40d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a6baa40d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a6baa40d

Branch: refs/heads/master
Commit: a6baa40dc9025f2023fa7234de0a2da0813e3641
Parents: 4b2dd8d
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Fri May 23 17:51:11 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri May 23 17:53:45 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/plugin.py | 6 +++---
 Allura/development.ini      | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/a6baa40d/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 2de236f..5846845 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -357,9 +357,9 @@ class LdapAuthenticationProvider(AuthenticationProvider):
 
     def _encode_password(self, password, salt=None):
         cfg_prefix = 'auth.ldap.password.'
-        salt_len = asint(config[cfg_prefix + 'salt_len'])
-        algorithm = asint(config[cfg_prefix + 'algorithm'])
-        rounds = asint(config[cfg_prefix + 'rounds'])
+        salt_len = asint(config.get(cfg_prefix + 'salt_len', 16))
+        algorithm = config.get(cfg_prefix + 'algorithm', 6)
+        rounds = asint(config.get(cfg_prefix + 'rounds', 6000))
         salt = self._get_salt(salt_len) if salt is None else salt
         encrypted = crypt.crypt(
             password.encode('utf-8'),

http://git-wip-us.apache.org/repos/asf/allura/blob/a6baa40d/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 172cafb..a792d44 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -86,6 +86,9 @@ auth.ldap.suffix = ou=people,dc=localdomain
 auth.ldap.admin_dn = cn=admin,dc=localdomain
 auth.ldap.admin_password = secret
 auth.ldap.schroot_name = scm
+auth.ldap.password.algorithm = 6
+auth.ldap.password.rounds = 6000
+auth.ldap.password.salt_len = 16
 
 # In seconds
 auth.recovery_hash_expiry_period = 600


Mime
View raw message