Przeglądaj źródła

Make secure - no more silly hashes

master
Pete Shadbolt 7 lat temu
rodzic
commit
5cf8016799
1 zmienionych plików z 2 dodań i 2 usunięć
  1. +2
    -2
      app.py

+ 2
- 2
app.py Wyświetl plik

@@ -3,7 +3,7 @@ from flask_redis import FlaskRedis
import json, abp, markdown import json, abp, markdown
from pprint import pprint from pprint import pprint
import raussendorf import raussendorf
import humanhash
import uuid


DAY = 60*60*24 DAY = 60*60*24
app = Flask(__name__) app = Flask(__name__)
@@ -11,7 +11,7 @@ redis = FlaskRedis(app)


@app.route("/") @app.route("/")
def index(): def index():
secret, uuid = humanhash.uuid()
secret = str(uuid.uuid4())
return redirect("/{}".format(secret)) return redirect("/{}".format(secret))


@app.route("/<uuid>") @app.route("/<uuid>")


Ładowanie…
Anuluj
Zapisz