Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haGib-0004xZ-N7 for pgadmin-hackers@arkaria.postgresql.org; Mon, 10 Jun 2019 09:35:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1haGia-0005vk-Ic for pgadmin-hackers@arkaria.postgresql.org; Mon, 10 Jun 2019 09:35:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haGiZ-0005ti-Tq for pgadmin-hackers@lists.postgresql.org; Mon, 10 Jun 2019 09:35:56 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haGiW-000497-Lw for pgadmin-hackers@postgresql.org; Mon, 10 Jun 2019 09:35:54 +0000 Received: by mail-lf1-x130.google.com with SMTP id a9so6129994lff.7 for ; Mon, 10 Jun 2019 02:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BbVWGfkyXteIl0N1ClErQXaDjsPm3lkny/uhgcJC8Co=; b=xRwidlF6QW2bc9lQC9tF9SZX/m4tKV0rFJKEM0LDKuUxsUSYD/gKoN17y2bwXEYmdg E+oXkyQZwoS5VKsrzuA8Bd2vQ9nVfZlRI6Vk9Bd4nYwL0Y5IMQba0GPq14M7p9VSpFBt 62Az8o28iWE1TAixFEbKkxDpPAJDuBCfdFiAXhindm4faSl9BEbVbIEeNvYfGl004H+K GgeeO0AqJQl5Xf6na6N0qDO91LcR5Re8/7+BVOUVAI/Nt8AbWvy8Ai+USzZAUByKSd+k iAdBmAv2DUFkFFdK+yCd/knBmSA5PJTPIdubRnni60ELVWtA/LnG71QTal+0fwqbtbyb 5xEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BbVWGfkyXteIl0N1ClErQXaDjsPm3lkny/uhgcJC8Co=; b=bURIi7LwzYdauFJc80ykWlIbXOPBL+qMoCJ1hnCU2nmaDCe8luBoIx7IkEATYCllbZ rseGfRerih9IKI3n59f8LyoHjuC9jRi9IkfPub9vuhVlhPnBoNE3B2EVwmmfMDLwqQan cwtrcF8oUOBWn+9Z2LIvZ56Nn9wjLY+J5f/HJvmU/bwqMoBuUUqv0AW4snZWoClEjRTr PHZrw2CGgAnAY8YncjFOyYBS4724WxANgtH1KOD5T7TuhfOVxsUPlblDQast9hoaxFk8 K+9h9R8dJNyZR8cSNzdBzBMJMq0wY50Bi3P0ZxeKNGUEEyt9hHhs2oSVjoWvnrh7qZjq DNVA== X-Gm-Message-State: APjAAAX++QmIaMwRDlM3yOpg0kZY05hgLgcpQKcgF7LFWMn5v12sOvI6 F45vF0NiEoLfORm1GQOIygJ/BrY8aqYvcUqWAdxTmZIC X-Google-Smtp-Source: APXvYqweqLdiJfq7tWfQlNYtSMuWuYvjOPgkgTiYXHA6ryZMfUzFi/4WA+sz7frSx/ntdeXiq2TFyRA2b36SdFkz5+s= X-Received: by 2002:ac2:558a:: with SMTP id v10mr35114282lfg.41.1560159350597; Mon, 10 Jun 2019 02:35:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Mon, 10 Jun 2019 15:05:14 +0530 Message-ID: Subject: Re: [pgAdmin][RM4310] User can not connect to the Master Password with Enter button To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="000000000000e2ff7a058af4e795" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000e2ff7a058af4e795 Content-Type: multipart/alternative; boundary="000000000000e2ff77058af4e793" --000000000000e2ff77058af4e793 Content-Type: text/plain; charset="UTF-8" Hi, On Mon, Jun 10, 2019 at 2:34 PM Dave Page wrote: > Hi > > On Wed, Jun 5, 2019 at 1:39 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi, >> >> On Wed, Jun 5, 2019 at 4:48 PM Dave Page wrote: >> >>> Hi >>> >>> On Wed, Jun 5, 2019 at 8:14 AM Aditya Toshniwal < >>> aditya.toshniwal@enterprisedb.com> wrote: >>> >>>> Hi Hackers, >>>> >>>> Attached is the patch to fix an issue where using browser autofills in >>>> alertify dialogs triggers the help page button (#4317). >>>> A workaround was added to master password dialog to avoid this, but >>>> that in turn disabled the 'OK' button tigger on pressing enter button. This >>>> is also fixed with this patch.(#4310) >>>> >>> >>> This isn't quite right. When the browser auto-fills the password, the OK >>> button remains disabled. I can hit enter though - however, I shouldn't be >>> able to do that when the OK button is disabled (being the default button on >>> the dialogue, it should respond to enter, unless another control which also >>> accepts enter has focus (e.g. a multiline text area). >>> >> The autofilled password appears as set, but it is actually not set to >> textbox unless you enter/click in the dropdown. We get the DOM element >> value as blank even if it appears filled. This is how chromium autofill >> behaves. Upon hitting enter the autofill value is set to the textbox and OK >> button is enabled. >> >>> >>> The OK button should be enabled - probably all the time, as the user >>> could have entered a blank password, and most systems won't prevent a user >>> from trying to use such a password. >>> >> I have made the changes to allow blank master password, plus enabling OK >> button always. Attached is the updated patch. >> > > I think you've slightly mis-understood what I was trying to say. > > - We should not allow a blank password. > - We should not disable the OK button at all. > > My analogy was focussed on the fact that most systems never disable OK > buttons on login dialogues, as some of those systems (but not all of > course) may allow blank passwords. > Got it !! Attached is the updated patch. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --000000000000e2ff77058af4e793 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

=
On Mon, Jun 10, 2019 at 2:34 PM Dave = Page <dpage@pgadmin.org> wro= te:
Hi

On Wed, Jun 5, 2019 at 1:39 PM Aditya Toshniwal <aditya.toshniwa= l@enterprisedb.com> wrote:
Hi,

On Wed, Jun 5, 2019 at 4:48 PM Dave Page &l= t;dpage@pgadmin.org<= /a>> wrote:
<= div dir=3D"ltr">
Hi

Hi Hackers,

Attached is the patch to fix an issue where using browser autofills in = alertify dialogs triggers the help page button (#4317).
A workaround was added to master password d= ialog to avoid this, but that in turn disabled the 'OK' button tigg= er on pressing enter button. This is also fixed with this patch.(#4310)

This isn't quite right. When t= he browser auto-fills the password, the OK button remains disabled. I can h= it enter though - however, I shouldn't be able to do that when the OK b= utton is disabled (being the default button on the dialogue, it should resp= ond to enter, unless another control which also accepts enter has focus (e.= g. a multiline text area).
The autofilled = password=C2=A0appears= as set, but it is actually not=C2=A0set to textbox unless you enter/click in the dropdown. We ge= t the DOM element value as blank even if it appears filled. This is how chr= omium autofill behaves. Upon hitting enter the autofill value is set to the= textbox and OK button is enabled.

The OK button should be enabled - probably all the time, = as the user could have entered a blank password, and most systems won't= prevent a user from trying to use such a password.
I have made the change= s to allow blank master password, plus enabling OK button always. Attached = is the updated patch.

I t= hink you've slightly mis-understood what I was trying to say.

- We should not allow a blank password.
- We shou= ld not disable the OK button at all.

My analogy wa= s focussed on the fact that most systems never disable OK buttons on login = dialogues, as some of those systems (but not all of course) may allow blank= passwords.
Got it !! Attached is the updated patch.
=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitte= r: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgr= eSQL Company


--
Adi= tya Toshniwal
Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a TREE"
--000000000000e2ff77058af4e793-- --000000000000e2ff7a058af4e795 Content-Type: application/octet-stream; name="RM4310_4317_v3.patch" Content-Disposition: attachment; filename="RM4310_4317_v3.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jwq6kggm0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc3RhdGljL2pzL2Jyb3dzZXIuanMgYi93 ZWIvcGdhZG1pbi9icm93c2VyL3N0YXRpYy9qcy9icm93c2VyLmpzCmluZGV4IDRhZjY5NjAzLi4y OWMxMWMyZSAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vYnJvd3Nlci9zdGF0aWMvanMvYnJvd3Nl ci5qcworKysgYi93ZWIvcGdhZG1pbi9icm93c2VyL3N0YXRpYy9qcy9icm93c2VyLmpzCkBAIC0x Miw3ICsxMiw3IEBAIGRlZmluZSgncGdhZG1pbi5icm93c2VyJywgWwogICAnc291cmNlcy9nZXR0 ZXh0JywgJ3NvdXJjZXMvdXJsX2ZvcicsICdyZXF1aXJlJywgJ2pxdWVyeScsICd1bmRlcnNjb3Jl JywgJ3VuZGVyc2NvcmUuc3RyaW5nJywKICAgJ2Jvb3RzdHJhcCcsICdzb3VyY2VzL3BnYWRtaW4n LCAncGdhZG1pbi5hbGVydGlmeWpzJywgJ2J1bmRsZWRfY29kZW1pcnJvcicsCiAgICdzb3VyY2Vz L2NoZWNrX25vZGVfdmlzaWJpbGl0eScsICcuL3Rvb2xiYXInLCAncGdhZG1pbi5oZWxwJywKLSAg J3NvdXJjZXMvY3NyZicsICdzb3VyY2VzL2tleWJvYXJkX3Nob3J0Y3V0cycsICdwZ2FkbWluLmJy b3dzZXIudXRpbHMnLAorICAnc291cmNlcy9jc3JmJywgJ3BnYWRtaW4uYnJvd3Nlci51dGlscycs CiAgICd3Y2RvY2tlcicsICdqcXVlcnkuY29udGV4dG1lbnUnLCAnanF1ZXJ5LmFjaXBsdWdpbics IC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gICAgICBidXR0b25zOlt7CkBAIC01NDcsMzAgKzU1MCwxMyBAQCBk ZWZpbmUoJ3BnYWRtaW4uYnJvd3NlcicsIFsKICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICBw cmVwYXJlOmZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXM7Ci0gICAg ICAgICAgICAgIGxldCAkcGFzc3dvcmQgPSBudWxsOwotICAgICAgICAgICAgICBsZXQgJG9rQnRu ID0gJChzZWxmLl9faW50ZXJuYWwuYnV0dG9uc1szXS5lbGVtZW50KTsKLQogICAgICAgICAgICAg ICBzZWxmLnNldENvbnRlbnQoc2VsZi5tZXNzYWdlKTsKLSAgICAgICAgICAgICAgJHBhc3N3b3Jk ID0gJChzZWxmLmVsZW1lbnRzLmJvZHkpLmZpbmQoJyNwYXNzd29yZCcpOwotCiAgICAgICAgICAg ICAgIC8qIFJlc2V0IGJ1dHRvbiBoaWRlICovCiAgICAgICAgICAgICAgIGlmKCFzZWxmLnJlc2V0 KSB7CiAgICAgICAgICAgICAgICAgJChzZWxmLl9faW50ZXJuYWwuYnV0dG9uc1sxXS5lbGVtZW50 KS5hZGRDbGFzcygnZC1ub25lJyk7CiAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAg ICAgICAgJChzZWxmLl9faW50ZXJuYWwuYnV0dG9uc1sxXS5lbGVtZW50KS5yZW1vdmVDbGFzcygn ZC1ub25lJyk7CiAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAvKiBFbmFibGUgb2sg b25seSBpZiBwYXNzd29yZCBlbnRlcmVkICovCi0gICAgICAgICAgICAgICRva0J0bi5wcm9wKCdk aXNhYmxlZCcsIHRydWUpOwotICAgICAgICAgICAgICAkcGFzc3dvcmQub24oJ2lucHV0IGNoYW5n ZSBrZXl1cCcsIChldmVudCk9PnsKLSAgICAgICAgICAgICAgICBrZXlib2FyZEZ1bmMuX3N0b3BF dmVudFByb3BhZ2F0aW9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