mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Add a log in the UI when a login attempt is made
This commit is contained in:
parent
d1d82aa300
commit
91448f1f45
1 changed files with 1 additions and 0 deletions
|
|
@ -1660,6 +1660,7 @@ def jobs_download():
|
|||
def login():
|
||||
fail = False
|
||||
if request.method == "POST" and "username" in request.form and "password" in request.form:
|
||||
app.logger.warning(f"Login attempt from {request.remote_addr} with username \"{request.form['username']}\"")
|
||||
if app.config["USER"].get_id() == request.form["username"] and app.config["USER"].check_password(request.form["password"]):
|
||||
# log the user in
|
||||
session["ip"] = request.remote_addr
|
||||
|
|
|
|||
Loading…
Reference in a new issue