Open Praful opened 4 days ago
Hmmmm it seems the solution you posposed does not (and probably won't) actually solve your issue. I think what you really need, and may be a better more useful feature, is the automatic removal of before/after whitespace on paste.
@droidmonkey Thanks. I was going to suggest that but thought some people might object to having pasted text amended. It would solve the problem for me and could be an option - disabled by default to preserve backward compatibility.
Out of curiosity, why do you think that displaying spaces (via a symbol say) spaces would not work? My rationale was that once I'd pasted the text, if I saw the spaces, I'd delete them. Obviously nicer to have the spaces removed for me :)
There is no feature in qt to offer this so it would be custom and probably a lot of code
Does Qt allow to set the font background to a different color from the textbox background? If so, that should be the easiest method. Or at least, you could automatically select all the text after it's pasted in. But none of this would be visible if the password is hidden, so maybe some sort of warning would be better?
Normally, though, you should be using the password generator, so this is really just an edge case.
Btw, a lot of times the extra spaces come from trying to copy-paste HTML (or other formatted text). So the first line of defense would be to make sure you're always pasting as plain text.
Summary
Sometimes, I create an account in KeePassXC by copying and pasting the username and passowrd. When I do this, occasionally, a trailing space is selected and that gets pasted into KeePassXC. When doing the reverse, eg pasting from KeePassXC to a browser, I can't see the space at the end of the password and I get an invalid login!
Regardless of how it happens, could you provide an option for showing spaces (or ideally any non-visible characters) in the app?
Since not everyone will want this, perhaps it could be added in settings as: Application Settings > General > User Interface > Show Spaces in Usernames and Passwords.