Skip to content

Fix username hyphen stripping and database locking issues#61

Open
fuleinist wants to merge 1 commit intojifunks:masterfrom
fuleinist:fix/usernames-and-database-locking
Open

Fix username hyphen stripping and database locking issues#61
fuleinist wants to merge 1 commit intojifunks:masterfrom
fuleinist:fix/usernames-and-database-locking

Conversation

@fuleinist
Copy link

This PR addresses two open issues and improves the security/robustness of the database layer.

Changes

  • Fixes Botany strips "-" from usernames #42: The 'visit' prompt now allows hyphens () in usernames. Previously, it only allowed alphanumeric characters and underscores.
  • Fixes "database is locked" eventually happens #49: Added a 30-second timeout to SQLite connections to mitigate 'database is locked' errors, especially useful on multi-user servers.
  • Security: Migrated all raw SQL string formatting to parameterized queries. This prevents SQL injection risks and ensures that usernames or plant descriptions containing special characters (like single quotes) do not break the database operations.

…ifunks#42: Allow hyphens in usernames in the 'visit' prompt.\n- Fixes jifunks#49: Added 30s timeout to SQLite connections to prevent 'database is locked' errors.\n- Security: Migrated to parameterized SQL queries to prevent SQL injection and handle special characters in usernames/descriptions.
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.

"database is locked" eventually happens Botany strips "-" from usernames

1 participant