mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-07-30 23:50:20 -07:00
Remove tokens when saving credentials
This commit is contained in:
+2
-1
@@ -25,7 +25,7 @@ import xml.etree.ElementTree as ET
|
||||
from copy import deepcopy
|
||||
from functools import wraps
|
||||
from io import BytesIO
|
||||
from shutil import copyfile
|
||||
from shutil import copyfile, rmtree
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from urllib.parse import quote
|
||||
from flask import Flask, request, jsonify, redirect, render_template, url_for, flash, session, abort, make_response, send_file, send_from_directory
|
||||
@@ -820,6 +820,7 @@ def garmin(username):
|
||||
flash("Garmin credentials can't be empty.")
|
||||
return render_template("garmin.html", username=current_user.username)
|
||||
encrypt_credentials(file, (request.form['username'], request.form['password']))
|
||||
rmtree('%s/%s/garth' % (STORAGE_DIR, current_user.player_id), ignore_errors=True)
|
||||
return redirect(url_for('settings', username=current_user.username))
|
||||
cred = decrypt_credentials(file)
|
||||
return render_template("garmin.html", username=current_user.username, uname=cred[0], passw=cred[1])
|
||||
|
||||
Reference in New Issue
Block a user