Closed mcepl closed 4 years ago
Hi, it's very hard for me to reproduce the error.
I tried to create a login kůň
and ffpass exported it without any issue.
If you can reproduce the bug, please download the test version (https://github.com/louisabraham/ffpass/archive/encoding.zip), install it with cd ffpass && pip install .
.
It should output a more explicit error message (it might contain a password so be careful before publishing the output).
The problem is not using non-ASCII characters (that .decode()
deals with perfectly), but using bytes
which are not valid UTF-8. E.g., for some inexplicable reasons:
~ $ grep bugzilla.redhat passwords.csv.gpg
https://bugzilla.redhat.com,b'\x8b\x16^f',b''
https://bugzilla.redhat.com,b'',b''
https://bugzilla.redhat.com,b'mcepl@cepl.eu',b'VERYSECRET'
https://bugzilla.redhat.com,b'mcepl@redhat.com',b'EVENMORESECRET'
https://bugzilla.redhat.com,b'mcepl@redhat.com',b'EVENMORESECRET'
~ $
Yes, of course, the first two lines present probably invalid data, but with this script I don't care about it, and I would rather have preserved a bit of nonsense, than not having preserved anything (I have just removed that .decode()
so all my strings are bytes, ignore that for a moment).
I don't understand how these non utf-8 passwords arrived in FF.
I think that your use case is very specific and you seem to be much more advanced than the average user so maybe it's better not to add this as a feature. What do you think?
I think that your use case is very specific and you seem to be much more advanced than the average user so maybe it's better not to add this as a feature. What do you think?
Certainly, but still you should follow “Be conservative in what you do, be liberal in what you accept from others.” anyway. You never know what comes your way.
ffpass 0.4.8, python 3.7.3 on Linux/openSUSE/Tumbleweed. Locale cs_CZ.UTF-8