MaterialFX
MaterialFX copied to clipboard
MFXPasswordField extends regular TextField
MFXPasswordField returns passwords as Strings which is insecure. Please refer to this answer for more details.
@M-K-Al So is the same for the JavaFX PasswordField
. I'm going to see if I can submit a pull request for this. In the meantime, if you really need a secure option, then use Swing's JPasswordField
.
EDIT: It's actually really hard to make a secure PasswordField without making major rewrites of the JavaFX PasswordField
. You could file a feature request to the JavaFX devs though. @palexdev I think this can be closed.
@M-K-Al the JavaFX's PasswordField does the same. I don't think it's responsibility of the UI element but rather the user. Maybe you should convert the returned String to a char[]
Also note that even if JPasswordField offers a method to return the text as a char[] there still are methods that return String (even if deprecated they are there) Plus, the getPassword() which returns the char[] simply gets the text and converts it to char[] Security has little to do with UI
So, either I add a similar method but the implementation remains the same or I just ignore this. I'll have to think about this
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.