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

saved password '§' turns to '§' when copied to clipboard or shown when editing #91

Closed
ghost opened this Issue Aug 27, 2015 · 10 comments

Comments

Projects
None yet
1 participant
@ghost

ghost commented Aug 27, 2015

Hi,

thank you for this excellent software.

Sadly, I found a rather problematic error. When saving a password with § in it, the actions of copy to clipboard or showing the password when editing, turn it into §, which alters the password.

If someone could perhaps test it, to make sure that the issue is not solely on my system, that would be great.

Using pass on the console returns the correct password. Should there in fact be an issue with qtpass, it would be really helpful to get a list of characters, that exhibit this sort of problem, to verify all existing passwords against possible corruption.

Thank you!

@annejan

This comment has been minimized.

Member

annejan commented Aug 27, 2015

Purely off the top of my head this looks like an encoding issue.
I'm pretty sure the clipboard either expects UTF-8 and is presented an ISO-8859 string or vice-versa.

Would you mind telling me which platform (and/or window manager) you are using?

@ghost

This comment has been minimized.

ghost commented Aug 27, 2015

Gentoo Linux, KDE Plasma5

The problem is, that, upon clicking "show password" (or whatever it says in english), in the edit dialog, it also shows the password as §.

@annejan

This comment has been minimized.

Member

annejan commented Aug 27, 2015

Thanks, I run the same (well, Arch, but KDE Plasma 5) on my main laptop, so that should make debugging this issue pretty easy.

The fact it also shows the password corrupted makes it even easier . .
Apparently the process that fetches the password already makes the encoding mistake.
Will try and look into this as soon as possible, thanks for finding and the clear description!

@ghost

This comment has been minimized.

ghost commented Aug 27, 2015

Thank you for looking into it!

If you could notify me when you have the patch ready, I'd like to fix this on my system as soon as possible.

@ghost

This comment has been minimized.

ghost commented Aug 28, 2015

It looks to me like process->readAllStandardOutput is not properly read as QString utf8.

Perhaps QString::fromUtf8 would help.

@ghost

This comment has been minimized.

ghost commented Aug 28, 2015

I just tested it and the password is received okay. Just plain § now.

Just made sure all process->readAllStandardOutput is properly wrapped in QString::fromUtf8 in mainwindows.cpp

Since I don't know the whole picture of how the program is written and don't have the time to work through it all, you have to make sure this actually works and doesn't create problems elsewhere.

I'll look forward to hearing from you.

@annejan

This comment has been minimized.

Member

annejan commented Aug 28, 2015

Wow, thanks for the effort!!

Will do some more testing (on Linux, Mac and Windows) tonight . .
Yesterday only had time to do a quick test on OSX and there it worked as-is (no encoding issues) . . so can easily do regression-testing..
Will probably have to check-out what the encoding of the shell-environment is and wrap accordingly etc.

Thanks again for your work on this issue.

@ghost

This comment has been minimized.

ghost commented Aug 28, 2015

Well my shell environment and complete system should be solidly utf8 only. Any way of testing why it went wrong with my system? Why QProcess returns non-utf8 by default?

@annejan

This comment has been minimized.

Member

annejan commented Sep 24, 2016

Look at #198 for possible fix.

@annejan

This comment has been minimized.

Member

annejan commented Sep 26, 2016

Closed by #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment