1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

exempt /push from authenticated pages

This commit is contained in:
Lynne Megido 2019-09-10 22:53:15 +10:00
parent 80b683cfde
commit 8e5538dc7d

View file

@ -22,7 +22,7 @@ scopes = ['write:statuses', 'write:accounts', 'read:accounts', 'read:notificatio
@app.before_request
def login_check():
if request.path not in ['/', '/about', '/welcome', '/login', '/signup', '/do/login', '/do/signup', '/static/style.css']:
if request.path not in ['/', '/about', '/welcome', '/login', '/signup', '/do/login', '/do/signup', '/static/style.css'] and not request.path.startswith("/push"):
# page requires authentication
if 'user_id' not in session:
return redirect(url_for('home'))
@ -489,6 +489,11 @@ def do_authenticate_bot():
session['step'] = 4
return redirect(url_for("bot_create"), 303)
@app.route("/push/<id>")
def push(id):
c = db.cursor()
print(request.form)
@app.route("/do/signup", methods=['POST'])
def do_signup():
# email validation is basically impossible without actually sending an email to the address