Missing RCON Password Validation #3

Open
opened 2026-02-02 15:09:46 -05:00 by jared · 0 comments
Owner

if not MINECRAFT_RCON_PASSWORD: # Line 410
# Only checked after user interaction
Issue: Should validate on startup, not during command execution.

Fix:

In CustomBot.init or setup_hook

async def setup_hook(self):
# Validate critical configs
if not MINECRAFT_RCON_PASSWORD:
logger.warning("MINECRAFT_RCON_PASSWORD not set - /minecraft command will fail")
if not PELICAN_API_KEY:
logger.warning("PELICAN_API_KEY not set - Pelican features disabled")

await self.tree.sync()
if not MINECRAFT_RCON_PASSWORD: # Line 410 # Only checked after user interaction Issue: Should validate on startup, not during command execution. Fix: # In CustomBot.__init__ or setup_hook async def setup_hook(self): # Validate critical configs if not MINECRAFT_RCON_PASSWORD: logger.warning("MINECRAFT_RCON_PASSWORD not set - /minecraft command will fail") if not PELICAN_API_KEY: logger.warning("PELICAN_API_KEY not set - Pelican features disabled") await self.tree.sync()
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/discordBot#3