From 81c356355b1e02ced8e69429ab759a1bb900cf81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Mon, 7 Aug 2017 13:14:03 +0200 Subject: [PATCH] Check that username match with UUID in login --- supysonic/frontend/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/supysonic/frontend/__init__.py b/supysonic/frontend/__init__.py index 6f6fadb..c004021 100644 --- a/supysonic/frontend/__init__.py +++ b/supysonic/frontend/__init__.py @@ -31,6 +31,9 @@ def login_check(): elif UserManager.get(store, session.get('userid'))[0] != UserManager.SUCCESS: session.clear() should_login = True + elif UserManager.get(store, session.get('userid'))[1].name != session.get('username'): + session.clear() + should_login = True if should_login: flash('Please login') @@ -48,4 +51,3 @@ def index(): from .user import * from .folder import * from .playlist import * -