From 424f9dc8da17aa69a9686696042f5e4ff8f9a3e9 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 18 Feb 2021 19:17:43 -0800 Subject: [PATCH] Add more logging --- redstring/server.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/redstring/server.py b/redstring/server.py index 6be5a28..91cd5f6 100644 --- a/redstring/server.py +++ b/redstring/server.py @@ -105,9 +105,13 @@ def document(document_id): @app.route('/login/', methods=['GET', 'POST']) def login(): form = LoginForm() - if form.validate_on_submit() and check_password(current_app, form.password.data): - login_user(Admin()) - return redirect(url_for('index')) + if form.validate_on_submit(): + logger.debug('checking pw') + valid = check_password(current_app, form.password.data) + logging.debug('checked, got' + str(valid)) + if valid: + login_user(Admin()) + return redirect(url_for('index')) return render_template('login.jinja', form=form)