From fc1140d8988f75b6b613e9b60ea9dee35fcdc1f4 Mon Sep 17 00:00:00 2001 From: Addison Phillips Date: Mon, 9 Sep 2024 12:29:44 -0700 Subject: [PATCH 1/2] Specify `bad-option` for bad digit size option values Fixes #739 --- spec/registry.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/registry.md b/spec/registry.md index 1138f7e8a6..9def140d02 100644 --- a/spec/registry.md +++ b/spec/registry.md @@ -380,13 +380,16 @@ Implementations MAY define an upper limit on the resolved value of a digit size option option consistent with that implementation's practical limits. In most cases, the value of a digit size option will be a string that -encodes the value as a decimal integer. +encodes the value as a decimal integer greater than or equal to zero. Implementations MAY also accept implementation-defined types as the value. When provided as a string, the representation of a digit size option matches the following ABNF: >```abnf > digit-size-option = "0" / (("1"-"9") [DIGIT]) >``` +If the value of a digit size option does not evaluate as a non-negative integer, +or if the value exceeds any implementation-defined upper limit +or any option-specific lower limit, a _Bad Option Error_ is emitted. ### Number Selection From 5a2b85bff2b8edb8bb4e50b6d8d203bd2329ab26 Mon Sep 17 00:00:00 2001 From: Addison Phillips Date: Mon, 9 Sep 2024 12:32:19 -0700 Subject: [PATCH 2/2] adopt 'non-negative integer' --- spec/registry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/registry.md b/spec/registry.md index 9def140d02..34f7a05d82 100644 --- a/spec/registry.md +++ b/spec/registry.md @@ -380,7 +380,7 @@ Implementations MAY define an upper limit on the resolved value of a digit size option option consistent with that implementation's practical limits. In most cases, the value of a digit size option will be a string that -encodes the value as a decimal integer greater than or equal to zero. +encodes the value as a non-negative integer. Implementations MAY also accept implementation-defined types as the value. When provided as a string, the representation of a digit size option matches the following ABNF: >```abnf