GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Change Server Password wrongly requires a current password when a pgpass file is used · Issue #10449 · pgadmin-org/pgadmin4

Change Server Password wrongly requires a current password when a pgpass file is used #10449

New issue
Copy link
New issue
Copy link
Closed
Closed
Change Server Password wrongly requires a current password when a pgpass file is used#10449
Copy link
Labels
BugjavascriptPull requests that update Javascript code

Description

@dpage
dpage
opened on Sep 22, 2026
Issue body actions

The Change Server Password dialog asks for the Current Password and refuses to submit without one, even when the server connects via a pgpass file and the user therefore has no reason to know that password. Anything typed into the field is then discarded, because the backend deliberately skips the check in that case, so the field is pure friction rather than a real requirement.

The intended behaviour is already written down in ChangePasswordContent.jsx, where the Current Password field is declared as disabled: self.isPgpassFileUsed and noEmpty: !self.isPgpassFileUsed, and the backend agrees: change_password() in web/pgadmin/browser/server_groups/servers/__init__.py detects the pgpass case and skips both the presence check and the comparison against the old password.

The reason it does not work is that the flag never arrives. showChangeServerPassword() passes isPgpassFileUsed={isPgPassFileUsed} to ChangePasswordContent, but the component does not accept that prop, and constructs its schema with the value hardcoded to false:

schema.current = new ChangePasswordSchema(
  userName, false, hasCsrfToken, showUser
);

So isPgpassFileUsed is always false, the field is always enabled, and it is always mandatory.

This has been the case since d6cddd8 (30th June 2023), which generalised the component for the rewritten authentication pages and dropped both userName and isPgpassFileUsed from its signature. The userName half of that regression, which left the User field blank, was fixed in 43d8b3f; this is the other half.

Suggested fix

Accept isPgpassFileUsed as a prop, defaulting to false, pass it through to the schema constructor in place of the literal, and add it back to propTypes. Worth noting that it changes form validation rather than only wording, so it wants a test covering both the pgpass and the ordinary password case, which is why it was left out of the rename in #10035 rather than folded in.

Whilst in there, hasCsrfToken deserves a look too: showChangeUserPassword() sets it, but the pgpass path does not, and the dialog's save button is labelled with a bare 'Change' that is never passed through gettext(), so it is not translated.

Activity

  1. dpage
    added
    Bug
    javascriptPull requests that update Javascript code
    on Sep 22, 2026
  2. MaybeSomeone-arc18 commented on Sep 23, 2026

    @MaybeSomeone-arc18
    MaybeSomeone-arc18
    on Sep 23, 2026
    Contributor
    More actions

    I'd like to take this one. I have a fix ready that passes isPgpassFileUsed through to the schema (default false), adds it to propTypes, and wraps the 'Change' button label in gettext(). I added a Jest spec covering both the pgpass and the normal password case. I'll open a PR unless someone else is already on it.

  3. MaybeSomeone-arc18
    added a commit that references this issue on Sep 23, 2026

    test: cover pgpass handling in ChangePasswordContent (pgadmin-org#10449)

    16225b7
  4. dpage
    closed this as completedin bdd3282on Sep 30, 2026
  5. dpage
    added a commit that references this issue on Sep 30, 2026

    Honour the pgpass file in the Change Server Password dialog (pgadmin-…

    This issue will close once commit bdd3282 is merged into the 'master' branch.
    bdd3282
  6. dev-hari-prasad commented on Sep 30, 2026

    @dev-hari-prasad
    dev-hari-prasad
    on Sep 30, 2026
    Contributor
    More actions

    @MaybeSomeone-arc18 Nice work. Thanks for the PR.

  7. MaybeSomeone-arc18 commented on Sep 30, 2026

    @MaybeSomeone-arc18
    MaybeSomeone-arc18
    on Sep 30, 2026
    Contributor
    More actions

    Thanks! Glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugjavascriptPull requests that update Javascript code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.