-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kUpb_DecodeOption_AlwaysValidateUtf8 decode option, to force UTF-…
…8 validation of proto2 strings. PiperOrigin-RevId: 597341799
- Loading branch information
1 parent
686cfc6
commit d4dfb9c
Showing
6 changed files
with
164 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2023 Google LLC. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
syntax = "proto2"; | ||
|
||
package upb_test; | ||
|
||
message TestUtf8Proto2Bytes { | ||
optional bytes data = 1; | ||
} | ||
|
||
message TestUtf8RepeatedProto2Bytes { | ||
optional bytes data = 1; | ||
} | ||
|
||
message TestUtf8Proto2String { | ||
optional string data = 1; | ||
} | ||
|
||
message TestUtf8RepeatedProto2String { | ||
repeated string data = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters