envoyproxy / envoyproxy/nighthawk

Missing check for adaptive load proto rules

Open
#553 2 comments 0 reactions 1 assignee Claimed by @colimitt View on GitHub
Dominant language
C++
Stars
414
Forks
95
Avg merge
2d 9h
Merged PRs (30d)
11

Description

Many adaptive load protos specify constraints on field values (`[(validate.rules)...]`), but we never actually call `Envoy::MessageUtil::validate()` to process them. This should be done within `AdaptiveLoadSessionSpecProtoHelperImpl::CheckSessionSpec()`.

Note:
```
/**
* Validate protoc-gen-validate constraints on a given protobuf.
* Note the corresponding `.pb.validate.h` for the message has to be included in the source file
* of caller.
* @param message message to validate.
* @throw ProtoValidationException if the message does not satisfy its type constraints.
*/
template
static void validate(const MessageType& message,
ProtobufMessage::ValidationVisitor& validation_visitor) {
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.