mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-06 20:07:32 +00:00
fix: Check for client ID mismatch in step-up auth
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user