mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? Explicitly validate utf-8 in string fields in proto messages in grpc requests/responses and deserialized from persistence, sampled based on dynamic config. Optionally fail grpc requests + deserialization also. Currently the grpc interceptor is on the frontend only. Deserialization checks are on all services. ## Why? Part of migrating from gogoproto, which did not validate string fields as utf-8: before starting to fail requests and deserialization, we want to monitor for bad data first. ## How did you test it? unit test, also manual testing with bad data in grpc requests ## Potential risks This code is potentially slow and runs as a grpc interceptor, could add cpu load + latency. The sampling control should mitigate this risk. --------- Co-authored-by: Chetan Gowda <[email protected]>