From 5cf80167992f5cb813b91eb819f0adcdded13ab3 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Tue, 24 Oct 2017 23:33:32 -0700 Subject: [PATCH] Make secure - no more silly hashes --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index e5a82b7..89f0b4a 100644 --- a/app.py +++ b/app.py @@ -3,7 +3,7 @@ from flask_redis import FlaskRedis import json, abp, markdown from pprint import pprint import raussendorf -import humanhash +import uuid DAY = 60*60*24 app = Flask(__name__) @@ -11,7 +11,7 @@ redis = FlaskRedis(app) @app.route("/") def index(): - secret, uuid = humanhash.uuid() + secret = str(uuid.uuid4()) return redirect("/{}".format(secret)) @app.route("/")