pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

Very long password not working in Query Tool in v9.6 and newer

Open squio opened this issue 4 months ago • 2 comments

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:

  1. 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
  2. Click on Connect server (or expand server icon in left toolbar), password popup is displayed
  3. Fill in password
  4. ✅ connection is made and database schema displayed in left column
  5. Expand schema and select a database table
  6. select Query Tool from menu, or right click and select view first 100 rows
  7. ⚠️ password popup is displayed (unexpected)
  8. fill in same password as before, submit
  9. ⛔ password is NOT accepted, popup immedieately re-appears

Expected behavior

  1. Click on Connect server (or expand server icon in left toolbar), password popup is displayed
  2. Fill in password
  3. connection is made and database schema displayed in left column
  4. Expand schema and select a database table
  5. select Query Tool from menu, or right click and select view first 100 rows
  6. 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

Image .

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

squio avatar Aug 21 '25 10:08 squio

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

squio avatar Aug 21 '25 15:08 squio

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

squio avatar Oct 06 '25 07:10 squio