envoyproxy / envoyproxy/nighthawk
Missing check for adaptive load proto rules
- 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
Assessment
This issue has not been assessed yet.