Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(postgres): Add URL escaping to database connection string (#380)
* feat(postgres): Add URL escaping to database connection string Add url.QueryEscape() to properly handle special characters in PostgreSQL connection parameters. This prevents potential connection issues and improves security when credentials contain special characters. Changes: - Escape username with url.QueryEscape() - Escape password with url.QueryEscape() - Escape hostname with url.QueryEscape() - Escape database name with url.QueryEscape() Example special characters handled: - @ in usernames (e.g., [email protected]) - Special chars in passwords (e.g., *, (, ), @) - Special chars in database names This change ensures the DSN string is properly formatted regardless of the characters present in the connection parameters. Related to PostgreSQL connection string format: postgres://username:password@hostname:port/database * Update src/lib/config/config.go Remove url.QueryEscape for Host Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update config.go to match spacing format --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
- Loading branch information