Add Size Limits to TypeName
Domain Names have restrictions on their total length, and the length of individual labels1.
Since TypeNames are expected to be reverse domain name strings, the
total length of the internal string should not exceed 255 and each
component should not exceed 63.
1
https://www.rfc-editor.org/rfc/rfc1035#section-2.3.4
3 files changed
+37
-1
1cab036c
→
82ad52b1
modified CHANGELOG.md
@@ -27,6 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cob/Cargo.toml
@@ -28,7 +28,7 @@ nonempty = { workspace = true, features = ["serialize"] }
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-cob/src/type_name.rs
@@ -10,6 +10,9 @@ use thiserror::Error;
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -19,6 +22,9 @@ use thiserror::Error;
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -40,8 +46,18 @@ impl FromStr for TypeName {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -89,6 +105,10 @@ mod test {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -96,5 +116,15 @@ mod test {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|