protobuf-go/encoding/protojson
cybrcodr beaa55256c encoding/protojson: add better validation to FieldMask serialization
For marshaling, apart from already existing check that each item in
paths field is reversible, also make sure that string is a valid
protobuf name.

For unmarshaling, make sure that each resulting item in paths field is
a valid protobuf name and input path item does not contain _. The latter
check satisfies the conformance test
Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter.

Fixes golang/protobuf#1141.

Change-Id: Iffc278089b20e496b7216d5b8c966b21b70e782d
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/236998
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2020-06-12 06:33:55 +00:00
..
bench_test.go types: consistently name generated protos 2019-05-16 21:55:40 +00:00
decode_test.go encoding/protojson: add better validation to FieldMask serialization 2020-06-12 06:33:55 +00:00
decode.go internal/genid: remove WhichFile 2020-05-29 21:03:06 +00:00
doc.go
encode_test.go encoding/protojson: add better validation to FieldMask serialization 2020-06-12 06:33:55 +00:00
encode.go internal/genid: remove WhichFile 2020-05-29 21:03:06 +00:00
well_known_types.go encoding/protojson: add better validation to FieldMask serialization 2020-06-12 06:33:55 +00:00