From 11b2ae63dc0fae6bd585ec09d48fc0ca620a4e7b Mon Sep 17 00:00:00 2001 From: itsmeow Date: Sat, 28 Jun 2025 16:14:58 -0500 Subject: [PATCH 1/2] Allow lower seeker ports I got a seeker port of 1035. Ugh, didn't know this was possible. --- src/bapi/blueprints/discord.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bapi/blueprints/discord.py b/src/bapi/blueprints/discord.py index 758c9dd..1132636 100644 --- a/src/bapi/blueprints/discord.py +++ b/src/bapi/blueprints/discord.py @@ -41,7 +41,7 @@ def discord_auth(): seeker_port = int(seeker_port) except ValueError: seeker_port = "" - if not isinstance(seeker_port, int) or seeker_port > 65535 or seeker_port < 10000: + if not isinstance(seeker_port, int) or seeker_port > 65535 or seeker_port < 444: seeker_port = "" session["oauth2_state"] = ( f"{urllib.parse.quote(ip.exploded, safe="", encoding="utf-8")},{seeker_port},{secrets.token_urlsafe(16)}" From dddddd0f7a8deb6cf561b87e76649e4359810583 Mon Sep 17 00:00:00 2001 From: itsmeow Date: Sat, 28 Jun 2025 16:23:05 -0500 Subject: [PATCH 2/2] Update src/bapi/blueprints/discord.py Co-authored-by: Crossedfall --- src/bapi/blueprints/discord.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bapi/blueprints/discord.py b/src/bapi/blueprints/discord.py index 1132636..2e51083 100644 --- a/src/bapi/blueprints/discord.py +++ b/src/bapi/blueprints/discord.py @@ -41,7 +41,7 @@ def discord_auth(): seeker_port = int(seeker_port) except ValueError: seeker_port = "" - if not isinstance(seeker_port, int) or seeker_port > 65535 or seeker_port < 444: + if not isinstance(seeker_port, int) or seeker_port > 65535 or seeker_port < 1023: seeker_port = "" session["oauth2_state"] = ( f"{urllib.parse.quote(ip.exploded, safe="", encoding="utf-8")},{seeker_port},{secrets.token_urlsafe(16)}"