Shift-Cyber / bits

Humanoid Discord bot with too much power and a bit of an attitude...
GNU General Public License v3.0
2 stars 0 forks source link

No validation on existing accounts #13

Closed natesinger closed 2 years ago

natesinger commented 2 years ago

In the registration cog, when a token is consumed, the bot doesn't validate that a user does not have an existing association in the server. Need to write this validation to ensure that if a user is re-registered the old association is removed. Ideally the validation process would be something like:

  1. validate token
  2. get user details from token
  3. validate user against discord registration and server registration
  4. remove old associations if they exist and add new ones

I'll get around to it at some point.

natesinger commented 2 years ago

Added account validation so that the member's Discord ID is saved to the account in the database and a user cannot register multiple Discord accounts with the same website account. If they do the current solution is to manually update the database record as this is considered an edge case or possibly a malicious scenario that requires further review. Contact Nate to make this correction to the user if need be. Long term we will probably configure options for this stuff via admin cogs.

https://github.com/Shift-Cyber/Bits/pull/19/commits/2a527431da84ebb8f5cb41f2d9f5a6f49d326afd