mirror of
https://github.com/databasus/databasus.git
synced 2026-04-06 00:32:03 +02:00
FIX (postgresql): Escape special characters in .pgpass file for authentication #391
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kapawit on 11/26/2025
Even if the password is correct, PostgreSQL may read it incorrectly if the special characters in the .pgpass file are not properly escaped. In the .pgpass format, the following characters must be escaped:
If these are not escaped, PostgreSQL will parse the file incorrectly and authentication will fail.
The fix aligns with PostgreSQL’s official .pgpass specification for handling special characters.