show session-key on application startup

Maybe useful to see that it really changes if unset. Also reduced key
size to 16 bytes form /dev/urandom (cosmetic reason, still enough).
pull/48/head
Martin Zimmermann 11 years ago
parent a4213e4304
commit 65f260d0ba

@ -155,6 +155,10 @@ def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
isso = App(conf)
# show session-key (to see that it changes randomely if unset)
logger.info("session-key = %s", isso.conf.get("general", "session-key"))
# check HTTP server connection
for host in conf.getiter("general", "host"):
with http.curl('HEAD', host, '/', 5) as resp:
if resp is not None:

@ -106,7 +106,7 @@ class Config:
default = [
"[general]",
"name = ",
"dbpath = /tmp/isso.db", "session-key = %r" % binascii.b2a_hex(os.urandom(24)),
"dbpath = /tmp/isso.db", "session-key = %s" % binascii.b2a_hex(os.urandom(16)),
"host = http://localhost:8080/", "max-age = 15m",
"notify = ",
"[moderation]",

Loading…
Cancel
Save