The Wayback Machine - https://web.archive.org/web/20210102172627/https://github.com/vaadin/framework/issues/10544
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PasswordField should not contain real password #10544

Open
fredl11 opened this issue Jan 17, 2018 · 8 comments
Open

PasswordField should not contain real password #10544

fredl11 opened this issue Jan 17, 2018 · 8 comments

Comments

@fredl11
Copy link

@fredl11 fredl11 commented Jan 17, 2018

This behavior is working as described in the documentation:

Unless the server connection is encrypted with a secure connection, such as HTTPS, the input is transmitted in clear text and may be intercepted by anyone with low-level access to the network.

I think it would be good practice to not reveal the actual password to the browser. The PasswordField should handle this transparently.

This was observed with Vaadin 8.2.1, but since it is working as documented, every version will be affected.

@Legioth
Copy link
Member

@Legioth Legioth commented Jan 17, 2018

Changing PasswordField to not send the string passed to setValue to the browser is an interesting idea, though I suspect the actual benefit is quite small. The reason for this is that in typical cases, PasswordField is used for transmitting password from the user and to the server (e.g. login or changing their password) and not in the opposite direction.

I would even claim that an application that has an actual value to pass to setValue() is typically doing something wrong since that means that they're actually storing the user's password (or a decryptable representation) instead of only storying a properly salted hash of the original password.

@fredl11
Copy link
Author

@fredl11 fredl11 commented Jan 17, 2018

I think your observation is correct. The behavior I propose could also be achieved manually today by implementing a getter/setter combination which does not reveal the password but uses a place holder value instead.

However, your second claim applies in my opinion only to applications that do not need the real password. Our application requires the actual password for authentication against SMTP servers or database servers. The PasswordField is used in the administrative interface for editing these connections.

@focbenz
Copy link
Contributor

@focbenz focbenz commented Jan 18, 2018

We are also affected by this issue and as a result have removed all PasswordFields from the application.
Every user can intercept the password with the browser debugger (e.g. pressing "F12") as long as the PasswordField is displayed on the screen.

@Legioth
Copy link
Member

@Legioth Legioth commented Jan 30, 2018

Good point about storing passwords for other purposes than end-users' login details. This is indeed something that could be considered, although I'm afraid it might not be on the top of our own priority lists.

@Legioth
Copy link
Member

@Legioth Legioth commented Jan 30, 2018

Should be quite easily implemented with a separate server-side field for the real value and then storing a random bogus value in the shared state, although you might then also have to override some logic inherited from AbstractTextField. In addition to this, it would also good to have a two-state configuration mode to let users opt in or out from this behavior since it might affect integration with e.g. TestBench or some extensions.

@elmot
Copy link
Contributor

@elmot elmot commented May 29, 2018

Might be also implemented very generic way with some HasValue wrapper, similar to V8 recent addition
#10643. Might be useful to store SSH keys etc. with TextArea or other controls.

In this case it should be WriteOnlyHasValue, indeed.

@stale
Copy link

@stale stale bot commented Oct 26, 2018

Hello there!

We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

  • Check if the issue is still valid for the latest version. There are dozens of duplicates in our issue tracker, so it is possible that the issue is already tackled. If it appears to be fixed, close the issue, otherwise report to the issue that it is still valid.
  • Provide more details how to reproduce the issue.
  • Explain why it is important to get this issue fixed and politely draw others attention to it e.g. via the forum or social media.
  • Add a reduced test case about the issue, so it is easier for somebody to start working on a solution.
  • Try fixing the issue yourself and create a pull request that contains the test case and/or a fix for it. Handling the pull requests is the top priority for the core team.
  • If the issue is clearly a bug, use the Warranty in your Vaadin subscription to raise its priority.

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

@stale stale bot added the Stale label Oct 26, 2018
@focbenz
Copy link
Contributor

@focbenz focbenz commented Oct 30, 2018

Please don't stale ... I think other people might still be affected using the PasswordField for display purposes.

@elmot elmot added enhancement and removed Stale labels Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.