fix(tvix/store/grpc_wrapper): don't validate node name
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>
This commit is contained in:
parent
cada007937
commit
98df0e4e34
1 changed files with 7 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue