Skip to content

Commit

Permalink
Only allow printable chars in metadata keys
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Dec 21, 2023
1 parent e8765c7 commit d2af320
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tips/TIP-0038/tip-0038.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ Feature</i>: smart contract request parameters are encoded in the metadata field
<tr>
<td>Key</td>
<td>(uint8)ByteArray</td>
<td>A string which may only consist of ASCII characters. A leading uint8 denotes its length.</td>
<td>A string which may only consist of printable ASCII characters. A leading uint8 denotes its length.</td>
</tr>
<tr>
<td>Value</td>
Expand All @@ -855,8 +855,8 @@ Feature</i>: smart contract request parameters are encoded in the metadata field

#### Additional Transaction Syntactic Validation Rules

- Each `Key` in the `Entries` must consist only of bytes that are valid ASCII characters, that is, each byte may not
exceed `127`.
- Each `Key` in the `Entries` must consist only of bytes that are printable ASCII characters, that is, for each
character `char` (interpreted as a byte) in the `Key` it must hold: `33 <= char <= 126`.
- Each `Key` in the `Entries` must be unique.
- `Entries Count` must be at least `1`.
- The serialized size of the map, consisting of the serialized size of `Entries Count` plus the serialized size of all
Expand Down

0 comments on commit d2af320

Please sign in to comment.