Skip to content

Commit

Permalink
Merge pull request #527 from donaldzou/fix-#516
Browse files Browse the repository at this point in the history
Security Patch
  • Loading branch information
donaldzou authored Nov 25, 2024
2 parents fa04ad1 + f942eaf commit 4524a55
Show file tree
Hide file tree
Showing 36 changed files with 41 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from flask.json.provider import DefaultJSONProvider

DASHBOARD_VERSION = 'v4.1.1'
DASHBOARD_VERSION = 'v4.1.2'
CONFIGURATION_PATH = os.getenv('CONFIGURATION_PATH', '.')
DB_PATH = os.path.join(CONFIGURATION_PATH, 'db')
if not os.path.isdir(DB_PATH):
Expand Down Expand Up @@ -1726,7 +1726,6 @@ def API_ValidateAuthentication():
def API_AuthenticateLogin():
data = request.get_json()
if DashboardConfig.APIAccessed:

authToken = hashlib.sha256(f"{request.headers.get('wg-dashboard-apikey')}{datetime.now()}".encode()).hexdigest()
session['username'] = authToken
resp = ResponseObject(True, DashboardConfig.GetConfig("Other", "welcome_session")[1])
Expand Down Expand Up @@ -1761,6 +1760,7 @@ def API_AuthenticateLogin():
def API_SignOut():
resp = ResponseObject(True, "")
resp.delete_cookie("authToken")
session.clear()
return resp

@app.route(f'{APP_PREFIX}/api/getWireguardConfigurations', methods=["GET"])
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4524a55

Please sign in to comment.