summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorKent Shikama <kent@kentshikama.com>2016-07-05 02:13:52 +0900
committerKent Shikama <kent@kentshikama.com>2016-07-05 02:13:52 +0900
commit8bdaf5f7afaee98a8cf25d2fb170fe4b2aa97f3d (patch)
tree07006dbee1224befeec0939b5ee7c423ac46d416 /synapse/config
parentMerge pull request #905 from KentShikama/add-password-hash (diff)
downloadsynapse-8bdaf5f7afaee98a8cf25d2fb170fe4b2aa97f3d.tar.xz
Add pepper to password hashing
Signed-off-by: Kent Shikama <kent@kentshikama.com>
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/password.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/password.py b/synapse/config/password.py
index dec801ef41..ea822f2bb5 100644
--- a/synapse/config/password.py
+++ b/synapse/config/password.py
@@ -23,10 +23,14 @@ class PasswordConfig(Config):
     def read_config(self, config):
         password_config = config.get("password_config", {})
         self.password_enabled = password_config.get("enabled", True)
+        self.pepper = password_config.get("pepper", "")
 
     def default_config(self, config_dir_path, server_name, **kwargs):
         return """
         # Enable password for login.
         password_config:
            enabled: true
-        """
+           # Uncomment for extra security for your passwords.
+           # DO NOT CHANGE THIS AFTER INITIAL SETUP!
+           #pepper: "HR32t0xZcQnzn3O0ZkEVuetdFvH1W6TeEPw6JjH0Cl+qflVOseGyFJlJR7ACLnywjN9"
+        """
\ No newline at end of file