[interchange] * Add generation of BCrypt pepper to makecat operation.
Mike Heins
interchange-cvs at icdevgroup.org
Tue Nov 17 20:22:59 UTC 2015
commit 65a86af5b2824dc5c9bdfbeafd135cfbe80a34d7
Author: Mike Heins <mike at perusion.com>
Date: Tue Nov 17 15:22:34 2015 -0500
* Add generation of BCrypt pepper to makecat operation.
dist/strap/catalog.cfg | 2 +-
dist/strap/config/makedirs | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/dist/strap/catalog.cfg b/dist/strap/catalog.cfg
index 8729aab..4e610ab 100644
--- a/dist/strap/catalog.cfg
+++ b/dist/strap/catalog.cfg
@@ -265,7 +265,7 @@ UserDB default from_plain 1
# The pepper should be unique for your site, but note that if you change this,
# it will make previously-crypted passwords inaccessible --
# so set this before you start adding users, or don't set at all.
-#UserDB default bcrypt_pepper CHANGE_ME_255370299252265
+UserDB default bcrypt_pepper __BCRYPT_PEPPER__
# Set to 1 to make the username and password case-insensitive
UserDB default ignore_case 1
diff --git a/dist/strap/config/makedirs b/dist/strap/config/makedirs
index 7154429..26928ee 100644
--- a/dist/strap/config/makedirs
+++ b/dist/strap/config/makedirs
@@ -90,6 +90,10 @@ fi
chmod $FMODE __MVC_RELOCATE__$LOGDIR/logs/error.log
chmod $FMODE __MVC_RELOCATE____MVC_CATROOT__/catalog.cfg
+
+## Create Bcrypt Pepper
+perl -e '@c=("A".."Z","a".."z",0..9);$p.=$c[rand(scalar @c)] for 1..32; print $p' > __MVC_RELOCATE____MVC_CATROOT__/variables/BCRYPT_PEPPER
+
# Make cache directories to store tmps.
if test -n '__MVC_CACHEDIR__'
then
More information about the interchange-cvs
mailing list