Merged in a bugfix and some sensitive data removal.

This commit is contained in:
Raoul Snyman 2010-01-18 22:18:49 +02:00
commit b56cd48dec
3 changed files with 15 additions and 14 deletions

View File

@ -39,13 +39,13 @@ paths.images = %(here)s/images
paths.themes = %(here)s/themes
# Security settings
security.salt = xgH,{@1pgtU9,nLd
security.salt = secretsalt
mail.on = true
mail.on = false
mail.manager = immediate
mail.smtp.server = mail.saturnlaboratories.co.za
mail.smtp.username = raoul.snyman+saturnlaboratories.co.za
mail.smtp.password = 0miG0sh89
mail.smtp.server = mail.mydomain.com
mail.smtp.username = mymailusername
mail.smtp.password = mymailpassword
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing ANYONE to

View File

@ -20,12 +20,12 @@ def load_environment(global_conf, app_conf):
engine = engine_from_config(app_conf, 'sqlalchemy.')
init_model(engine)
theme_name = None
if not app_conf.get('setup-app'):
# Pull out theme variable
theme = Session.query(Variable).get(u'theme')
if theme:
theme_name = theme.value
else:
theme_name = None
# Set up Pylons paths
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@ -32,6 +32,7 @@ log = logging.getLogger(__name__)
def setup_app(command, conf, vars):
"""Place any commands to setup scribeengine here"""
conf.local_conf['setup-app'] = True
load_environment(conf.global_conf, conf.local_conf)
import hashlib
@ -56,10 +57,10 @@ def setup_app(command, conf, vars):
role_admin = Role(name=u'Administrator')
role_admin.permissions.extend([perm_addposts, perm_editmyposts, perm_delmyposts])
password = unicode(hmac.new(conf[u'security.salt'], u'omigosh',
password = unicode(hmac.new(conf[u'security.salt'], u'password',
hashlib.sha256).hexdigest(), u'utf-8')
user = User(email=u'raoul.snyman@saturnlaboratories.co.za',
password=password, nick=u'raoul')
user = User(email=u'admin@scribeengine.org',
password=password, nick=u'admin')
user.roles.append(role_admin)
Session.add_all([blog_title, blog_slogan, user])