aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-14 12:28:41 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-14 12:28:41 +0100
commit491108a46811b824508ee16fb02070f8d5a49e1a (patch)
treee23a2e4a15c1920281df5444c248757a0afc4ee2 /src
parentarticle URL resolving has been removed (wasn't used) (diff)
downloadnewspipe-491108a46811b824508ee16fb02070f8d5a49e1a.tar.gz
newspipe-491108a46811b824508ee16fb02070f8d5a49e1a.tar.bz2
newspipe-491108a46811b824508ee16fb02070f8d5a49e1a.zip
more simple to just use os.urandom for the secret key.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap.py6
-rw-r--r--src/conf.py2
-rw-r--r--src/conf/conf.cfg-sample1
3 files changed, 2 insertions, 7 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py
index 24d6ff27..f7a3754c 100644
--- a/src/bootstrap.py
+++ b/src/bootstrap.py
@@ -39,10 +39,8 @@ application.config['PREFERRED_URL_SCHEME'] = scheme
set_logging(conf.LOG_PATH, log_level=conf.LOG_LEVEL)
-# Create dummy secrey key so we can use sessions
-application.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None)
-if not application.config['SECRET_KEY']:
- application.config['SECRET_KEY'] = os.urandom(12)
+# Create secrey key so we can use sessions
+application.config['SECRET_KEY'] = os.urandom(12)
application.config['RECAPTCHA_USE_SSL'] = True
application.config['RECAPTCHA_PUBLIC_KEY'] = conf.RECAPTCHA_PUBLIC_KEY
diff --git a/src/conf.py b/src/conf.py
index a9109fba..24be833c 100644
--- a/src/conf.py
+++ b/src/conf.py
@@ -35,7 +35,6 @@ DEFAULTS = {"platform_url": "https://JARR.herokuapp.com/",
"log_path": "jarr.log",
"log_level": "info",
"user_agent": "JARR (https://github.com/JARR-aggregator)",
- "secret": "",
"enabled": "false",
"notification_email": "jarr@no-reply.com",
"tls": "false",
@@ -99,7 +98,6 @@ LOG_LEVEL = {'debug': logging.DEBUG,
WEBSERVER_HOST = config.get('webserver', 'host')
WEBSERVER_PORT = config.getint('webserver', 'port')
-WEBSERVER_SECRET = config.get('webserver', 'secret')
CDN_ADDRESS = config.get('cdn', 'cdn_address')
diff --git a/src/conf/conf.cfg-sample b/src/conf/conf.cfg-sample
index ab8c4730..3d7a27a6 100644
--- a/src/conf/conf.cfg-sample
+++ b/src/conf/conf.cfg-sample
@@ -1,7 +1,6 @@
[webserver]
host = 127.0.0.1
port = 5000
-secret = a secret only you know
[cdn]
cdn_address = https://cdn.cedricbonhomme.org/
[misc]
bgstack15