Skip to content

Commit

Permalink
1) Fixed an issue where the ad-hoc server with SSH Tunnel repeatedly …
Browse files Browse the repository at this point in the history
…prompted for the password.

2) Fixed an issue where the SSH Tunnel password was not being saved in the External Database if its encoded length exceeded 64 characters.
3) 'Save Password' check box should be hidden for SSH Tunnel password on the Welcome page.
  • Loading branch information
akshay-joshi committed Jan 29, 2025
1 parent 1607875 commit 228156d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions web/migrations/versions/255e2842e4d7_.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def upgrade():
batch_op.alter_column('id', autoincrement=True)
batch_op.add_column(sa.Column('is_adhoc', sa.Integer(),
server_default='0'))
batch_op.alter_column('tunnel_password',
existing_type=sa.String(length=64),
type_=sa.String())


def downgrade():
Expand Down
2 changes: 1 addition & 1 deletion web/migrations/versions/aa86fb60b73d_.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


def upgrade():
op.add_column('server', sa.Column('tunnel_password', sa.String(length=64)))
op.add_column('server', sa.Column('tunnel_password', sa.String()))


def downgrade():
Expand Down
1 change: 1 addition & 0 deletions web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ export default function AdHocConnection({mode}) {
data={error.response?.data?.result}
onOK={(okFormData)=>{
formData['password'] = okFormData.get('password');
formData['tunnel_password'] = okFormData.get('tunnel_password');
onSaveClick(isNew, formData);
}}
hideSavePassword={true}
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight,
<InputText inputRef={firstEleRef} type="password" value={formData['tunnel_password']} controlProps={{maxLength:null, autoComplete:'new-password'}}
onChange={(e)=>onTextChange(e, 'tunnel_password')} onKeyDown={(e)=>onKeyDown(e)} />
</Box>
<Box marginTop='12px' marginBottom='12px' visibility={data.hide_save_tunnel_password ? 'hidden' : 'unset'}>
<Box marginTop='12px' marginBottom='12px' visibility={hideSavePassword ? 'hidden' : 'unset'}>
<InputCheckbox controlProps={{label: gettext('Save Password')}} value={formData['save_tunnel_password']}
onChange={(e)=>onTextChange(e.target.checked, 'save_tunnel_password')} disabled={!data.allow_save_tunnel_password} />
</Box>
Expand Down

0 comments on commit 228156d

Please sign in to comment.