cossacklabs / acra

Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.
https://www.cossacklabs.com/acra/
Apache License 2.0
1.35k stars 128 forks source link

Substitute oid in parse #541

Closed G1gg1L3s closed 2 years ago

G1gg1L3s commented 2 years ago

This PR fixes substitution of OID in packets. Before, it substituted them in the data messages, which are returned by select. But there is another place where they can arrive - in parse packets. We missed it, because they are optional and most frontends do not specify them.

To test it, I've added a new dependency to our python tests - psycopg3. The first stable version was released on 2021-10-13, but I think we can start to use it because of its support of various features. For example in this case, this frontend sets the type of parameters in the parse packets. Also it helped to discover bug with encoding of i32, so in some cases tests could fall. I will fix it as soon as possible.

Checklist

G1gg1L3s commented 2 years ago

The broken tests are the result of T2568. The fix is at https://github.com/cossacklabs/acra/pull/542