Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add pepper to password hashing #907
Conversation
matrixbot
commented
Jul 4, 2016
|
Can one of the admins verify this patch? |
matrixbot
commented
Jul 4, 2016
|
Can one of the admins verify this patch? |
matrixbot
commented
Jul 4, 2016
|
Can one of the admins verify this patch? |
matrixbot
commented
Jul 4, 2016
|
Can one of the admins verify this patch? |
matrixbot
commented
Jul 4, 2016
|
Can one of the admins verify this patch? |
erikjohnston
and 1 other
commented on an outdated diff
Jul 5, 2016
| 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" |
erikjohnston
Owner
|
erikjohnston
self-assigned this
Jul 5, 2016
|
@matrixbot ok to test |
KentShikama
added some commits
Jul 5, 2016
erikjohnston
and 1 other
commented on an outdated diff
Jul 5, 2016
| @@ -763,6 +764,7 @@ def validate_hash(self, password, stored_hash): | ||
| Whether self.hash(password) == stored_hash (bool). | ||
| """ | ||
| if stored_hash: | ||
| - return bcrypt.hashpw(password, stored_hash.encode('utf-8')) == stored_hash | ||
| + return bcrypt.hashpw(password + self.hs.config.password_config.pepper, |
erikjohnston
Owner
|
erikjohnston
commented on an outdated diff
Jul 5, 2016
erikjohnston
commented on an outdated diff
Jul 5, 2016
| 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. | ||
| + # Change to a secret random string. | ||
| + # DO NOT CHANGE THIS AFTER INITIAL SETUP! | ||
| + #pepper: "HR32t0xZcQnzn3O0ZkEVuetdFvH1W6TeEPw6JjH0Cl+qflVOseGyFJlJR7ACLnywjN9" |
erikjohnston
Owner
|
KentShikama
added some commits
Jul 5, 2016
|
(I think the dendron test failure is nothing to do with this PR) |
|
Thanks for this! :) |
KentShikama commentedJul 4, 2016
Random pepper generated by
I took the first x characters so the line length was 89 to fit within the < 90 char limit.