Fixed oauth2 account spoofing using unverified discord accounts for claiming identity
This commit is contained in:
parent
faebaa59dd
commit
389ded9b77
1 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,13 @@ public class DiscordOAuth2Provider : OAuth2Provider
|
|||
|
||||
var email = getData.GetValue<string>("email");
|
||||
var id = getData.GetValue<ulong>("id");
|
||||
var verified = getData.GetValue<bool>("verified");
|
||||
|
||||
if (!verified)
|
||||
{
|
||||
Logger.Warn("A user tried to use an unverified discord account to login", "security");
|
||||
throw new DisplayException("You can only use verified discord accounts for oauth signin");
|
||||
}
|
||||
|
||||
// Handle data
|
||||
|
||||
|
|
Loading…
Reference in a new issue