friends-of-reactphp / mysql

Async MySQL database client for ReactPHP.
MIT License
334 stars 66 forks source link

Handle parser errors by emitting error and closing connection #159

Closed clue closed 2 years ago

clue commented 2 years ago

This changeset makes the parser more robust by splitting on individual package boundaries and handles parser errors by emitting error and closing connection. This should have no effect for well-behaving servers, but makes our parser more robust for misbehaving servers or servers sending invalid data (intentionally or otherwise).

Together with the analysis in ticket https://github.com/friends-of-reactphp/mysql/issues/123 and the work done in #158, you're looking at around two days of work, enjoy!

Builds on top of #158 Refs #123

clue commented 2 years ago

Rebased on 0.5.x to fix unrelated HHVM build error addressed in #160 in the meantime. This is now ready for review :shipit: