From 0275beadb390d321255100a334ecdab7701dfac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 9 Jul 2020 16:53:51 -0400 Subject: [PATCH] OAuth: invalidate token if current scope was concerned Change-Id: Iec1bb9a287d97dff8cc4342fe5ebf7d2238f10b4 --- src/jamidht/server_account_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jamidht/server_account_manager.cpp b/src/jamidht/server_account_manager.cpp index b67a656d95..469dffd64c 100644 --- a/src/jamidht/server_account_manager.cpp +++ b/src/jamidht/server_account_manager.cpp @@ -246,7 +246,7 @@ void ServerAccountManager::authError(TokenScope scope) { { std::lock_guard<std::mutex> lock(tokenLock_); - if (scope >= tokenScope_) { + if (scope <= tokenScope_) { token_ = {}; tokenScope_ = TokenScope::None; } -- GitLab