commit | 4151cae27a5976c3ddf7cbd789679841519a32d5 | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Mon Dec 09 14:31:23 2019 -0800 |
committer | Damien Neil <dneil@google.com> | Tue Dec 10 23:02:58 2019 +0000 |
tree | 3f6df0eea2fce1c8e130a14261fa63e63a234643 | |
parent | 62d204ccc39ba6c25a7ca786cd75ef0cad2af528 [diff] |
internal/impl: more checks for aberrant messages When loading a *MessageInfo for a legacy message type, check to see if the Go type contains at least one field which looks like a message field. Specifically, look for at least one field with a `protobuf:` tag, or an XXX_unrecognized field. If a message has no recognizable fields, assume that it's something we don't know how to interpret and treat it as an aberrant message. Change-Id: If5c09087f1a0187271c98539d761395a2ee70a9e Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/210617 Reviewed-by: Joe Tsai <joetsai@google.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.