Skip to content

Pull Claude changes#9

Merged
plop91 merged 2 commits intoian-nightlyfrom
claude/code-review-fixes-01QCHvNP9YzDQSmjB2LFn29M
Nov 15, 2025
Merged

Pull Claude changes#9
plop91 merged 2 commits intoian-nightlyfrom
claude/code-review-fixes-01QCHvNP9YzDQSmjB2LFn29M

Conversation

@plop91
Copy link
Owner

@plop91 plop91 commented Nov 15, 2025

No description provided.

CRITICAL FIXES:
- Fix database credentials bug in settings.py (lines 65-78) - variables were assigned args.db_host instead of correct arguments
- Fix path traversal vulnerability in audioCog.py - added validation to prevent directory traversal attacks
- Replace deprecated .logout() with .close() in adminCog.py for discord.py 2.0+ compatibility
- Fix unsafe admin restart logic - added note about process manager requirement
- Improve exception handling in database operations - use specific exceptions instead of bare except

HIGH PRIORITY FIXES:
- Implement blacklist persistence in openAiCog.py - blacklist now saves to/loads from JSON file
- Fix file handle leak in openAiCog.py - use context manager for file operations
- Add IndexError protection in openAiCog.py - check attachments list before accessing
- Fix ValueError in blacklist removal - check if user exists before removing
- Fix fragile string comparison in run status check - use exact equality
- Fix incorrect task loop parameters in generalCog.py - use @tasks.loop(hours=1)
- Fix text channel attribute access in audioCog.py - handle both Context and Channel objects
- Fix blocking ffmpeg.probe() operation - run in executor to avoid blocking event loop

MEDIUM PRIORITY FIXES:
- Remove debug print statement in twitterCog.py - replace with logger.debug()
- Add error handling for Twitter API and wget calls
- Fix improper string formatting in gameCog.py logging
- Add input validation for gameCog commands - validate int conversions
- Remove admin list leak from unauthorized access messages
- Add rate limiting for OpenAI API calls - 1 request per 60 seconds per user
- Add TTS text length validation - max 500 characters
- Add repeat command limit - max 10 repeats

All fixes follow security best practices and improve code reliability.
- Replace hardcoded 'nightly' tag with docker/metadata-action
- Automatically tags Docker images based on branch name
- Supports branch pushes, PRs, and SHA-based tags
- Adds required checkout step for metadata action
@plop91 plop91 merged commit 15082ee into ian-nightly Nov 15, 2025
1 of 2 checks passed
@plop91 plop91 deleted the claude/code-review-fixes-01QCHvNP9YzDQSmjB2LFn29M branch November 27, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants