Page MenuHomePhabricator

[keyserver] Don't crash on malformed socket input
ClosedPublic

Authored by ashoat on Jan 24 2023, 4:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 12:30 AM
Unknown Object (File)
Tue, Nov 12, 12:30 AM
Unknown Object (File)
Tue, Nov 12, 12:30 AM
Unknown Object (File)
Tue, Nov 12, 12:30 AM
Unknown Object (File)
Sat, Nov 9, 2:31 AM
Unknown Object (File)
Sat, Nov 9, 2:30 AM
Unknown Object (File)
Sat, Nov 9, 2:28 AM
Unknown Object (File)
Sat, Nov 9, 1:19 AM
Subscribers
None

Details

Summary

This diff makes it so now if checkInputValidator throws a ServerError due to input validation failing, clientSocketMessage will be set in this catch block.

This is important because the catch block has an invariant expecting the clientSocketMessage to be set.

Test Plan

I had a reproducible issue where I could trigger checkInputValidator to throw a ServerError. I confirmed that the invariant was no longer triggered after my change

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/socket-validation
Lint
No Lint Coverage
Unit
No Test Coverage