diff options
author | Florian Klink <flokli@flokli.de> | 2024-10-18T11·48+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-10-18T19·51+0000 |
commit | 98df0e4e34683db103d1b258ed7449676f647dae (patch) | |
tree | 8fec16803930f62dc2d3d07a6d1cd5c55fcb804d /tvix/store | |
parent | cada007937663614072e0b7cb0207a85626937ab (diff) |
fix(tvix/store/grpc_wrapper): don't validate node name r/8832
Clients can (and do) send an empty name in here, and we discard it anyways. Change-Id: Iec135d9cba48cc066464e5639319c845079787e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12659 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store')
-rw-r--r-- | tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs b/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs index 5da3b23c269c..d003d4bdb728 100644 --- a/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs +++ b/tvix/store/src/proto/grpc_pathinfoservice_wrapper.rs @@ -77,10 +77,13 @@ where &self, request: Request<castorepb::Node>, ) -> Result<Response<proto::CalculateNarResponse>> { - let (_, root_node) = request.into_inner().into_name_and_node().map_err(|e| { - warn!(err = %e, "invalid root node"); - Status::invalid_argument("invalid root node") - })?; + let (_, root_node) = request + .into_inner() + .into_name_bytes_and_node() + .map_err(|e| { + warn!(err = %e, "invalid root node"); + Status::invalid_argument("invalid root node") + })?; match self.nar_calculation_service.calculate_nar(&root_node).await { Ok((nar_size, nar_sha256)) => Ok(Response::new(proto::CalculateNarResponse { |