Very long password not working in Query Tool in v9.6 and newer
Please note that security bugs or issues should be reported to [email protected].
Describe the bug
Using a very long password to connect to the server is not working in Query Tool and Filter Tool query
We have set up access to a Postgres instance on AWS (RDC) using a time-limited authentication link as the password. This used to work just fine up to and including pgAdmin 9.5.
In pgAdmin 9.6 this works for the initial connection, but fails for subsequent queries
Example of such a "passwrd", all sensitive characters replaced but length exactly as original (1248 characters):
abc123xyzzzzzzz.abc123xyzzzz.us-east-1.rds.amazonaws.com:5432/?Action=connect&DBUser=user_memyself&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ABC123XYZZZZZZZZZZZZ%2F20250820%2Fus-east-1%2Frds-db%2Faws4_request&X-Amz-Date=20250820T140917Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Security-Token=abc123xyzzzzzzzzzzz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2xxxxx%2Bxxxxxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxx%2Bxxxx%2B%2Fxxxxxxx%2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%2Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%3D&X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
To Reproduce
Steps to reproduce the behavior:
- Configure a AWS RDC server by specifying https host (
abc123xyzzzzzzz.abc123xyzzzz.us-east-1.rds.amazonaws.com) with default port and a user name, leave password empty and connect over plain https - Click on Connect server (or expand server icon in left toolbar), password popup is displayed
- Fill in password
- ✅ connection is made and database schema displayed in left column
- Expand schema and select a database table
- select Query Tool from menu, or right click and select view first 100 rows
- ⚠️ password popup is displayed (unexpected)
- fill in same password as before, submit
- ⛔ password is NOT accepted, popup immedieately re-appears
Expected behavior
- Click on Connect server (or expand server icon in left toolbar), password popup is displayed
- Fill in password
- connection is made and database schema displayed in left column
- Expand schema and select a database table
- select Query Tool from menu, or right click and select view first 100 rows
- the password should be cached for the session and the query results should be displayed
Error message
connection failed: connection to server at "10.32.1xx.xx8", port 5432 failed: FATAL: PAM authentication failed for user "username"
Screenshots
Desktop (please complete the following information):
- OS: Mac OS 15.6 (24G84)
- pgAdmin version: 9.6
- Mode: Desktop
- Browser N/A
- Package type: Disk image
Additional context
This is a regression, reverting back to pgAdmin to version 9.5 and this works just as expected
Just noticed that pgAdmin 9.7 is released and this no longer has this issue 🎉
👉 If you are affected, just upgrade to pgAdmin v9.7 or later
Reopening this issue b/c I noticed it still affects pgAdmin 9.8 on Mac OS Tahoe
MacBook Pro - Apple M1 OS: Mac OS 26.0.1 (25A362) pgAdmin 4 v 9.8
Reverting back to 9.7 does NOT work Reverting back to 9.5 DOES work