aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2021-02-08 22:54:53 +0900
committerGitHub <noreply@github.com>2021-02-08 22:54:53 +0900
commit158e69c6f0efafd5157e39e7c2de80919090cec2 (patch)
treeb6f667b0ea4c092d714cd13a919933960fdc072b
parentaea1c4f3108070c3da599c48d0cbcf49406226bd (diff)
parent8dd83327b5b9b77912b3b69ec00dc31898a86bc7 (diff)
Merge pull request #4935 from ConfusedPolarBear/quickconnect-cleanup
Remove used quick connect tokens
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index 4e026a0e6..10e28c33a 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -1456,7 +1456,12 @@ namespace Emby.Server.Implementations.Session
throw new SecurityException("Unknown quick connect token");
}
- request.UserId = result.Items[0].UserId;
+ var info = result.Items[0];
+ request.UserId = info.UserId;
+
+ // There's no need to keep the quick connect token in the database, as AuthenticateNewSessionInternal() issues a long lived token.
+ _authRepo.Delete(info);
+
return AuthenticateNewSessionInternal(request, false);
}