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

Allow plain connection after ssl deny #526

Closed G1gg1L3s closed 2 years ago

G1gg1L3s commented 2 years ago

Right now, if some clients receive SSL deny from the server, they can try to start plain connection by sending plain Startup message. The last one would then be served not as a startup, but as a general one, which will hang a connection.

This PR fixes this by reloading client thread after ssl deny to expect startup message again.

There are a couple of TODOs, which I hope you will help me to resolve.

Checklist