fix: Check for client ID mismatch in step-up auth

This commit is contained in:
Ginger
2026-10-05 14:22:53 +00:00
committed by Ellis Git
parent 18f2118c42
commit 4d7341c32d
+10
View File
@@ -586,6 +586,16 @@ async fn create_session(
));
};
if session_info.client_id != client_id {
// This device was created by a different piece of client
// software. Either the client stepping up
// changed its registration without logging out
// or someone is screwing with things.
return Err(OAuthError::invalid_grant(
"The supplied device was created by a different client",
));
}
session_info.temporary_scopes = requested_scopes.scopes;
self.services