Skip to content

Commit

Permalink
check for uuid collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy authored Feb 27, 2024
1 parent e65d95b commit 9e0b589
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/src/cogs/ms_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ async def get_real_ms_auth_link(self, data) -> Optional[Union[str, Literal[False
return self.auth_flows.get(state, (0, 0, {}))[2].get("auth_uri")

def get_ms_auth_link(self, member_id: int) -> str:
state = uuid.uuid4().hex
while (state := uuid.uuid4().hex) in self.auth_flows:
pass

auth_flow = self.application.initiate_auth_code_flow(
scopes=["User.Read"],
Expand Down

0 comments on commit 9e0b589

Please sign in to comment.