Re: [Patch/GMime3 branch] Autocrypt

Albrecht Dreß <[email protected]> Sat, 30 Nov 2019 17:55:56 +0100
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
Hi Peter!

Am 30.11.19 16:38 schrieb(en) Peter Bloomfield:
> In autocrypt_user_info(), sqlite3_bind_text() returns SQLITE_OK, but sqlite3_step() returns SQLITE_DONE instead of SQLITE_ROW; so the user_info is not allocated, and NULL is returned.

I suspect that there is some lower-case vs. mixed case mail address confusion – can you please try the attached patch (which enforces lower-case for all mail addresses; this is not strictly RFC 5322 compliant, as the local-part shall be case-sensitive, but in practice it is).  The patch just changes the SQL queries.

*Before* re-trying, you should erase all “offending” records from the database:

<snip>
$ sqlite3 ~/.balsa/autocrypt.db
delete from autocrypt where addr != lower(addr);
.q
</snip>

This problem could /not/ occur in the old (master) implementation, as in function eval_autocrypt_attr() the mail address was explicitly converted to lower-case.

Do we already have balsa gmime3 in the wild (so we should clean up the database as above when balsa is started), or are we actually the only users so far, and can omit it?

Cheers,
Albrecht.

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEcCEPemLFTtyGf4zATKlvDmfn2fgFAl3inxwACgkQTKlvDmfn
2fgtrgf8Cd/hlfASR6uXh7dVbGV6l9lxZQoR6FPlTCmtA9+RlHf7DVQPgnEfoTQb
kFD5dPmaAxWkLCrjnjFvkDwujabF+BoDH/3bW+m9BJuxkzNvoSvod5BsrGiLqFBT
aoh6+wOznqdjR8z5DZFpKQiAspkeZ9ivcsolx0KXyoUxiMTwiSXFX96jY64FlYii
kRJD8etyh9hwOBQuy6m1p/XQ1BtagDObFyTItkfWdfWDATLfFqzndMoNVwA5eXeL
Dx+tXnNV84l96Sq3ILLWSJedvaQvuMqextc37Hstgz1YnVbjG3QUkJ4cittcx5kT
/CCOxkO5rAO4Jts2R+tynfV02Y8zhA==
=wMxD
-----END PGP SIGNATURE-----