From d1878546b1bd70b85a2c4303ab7bd444baba291f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:37:50 -0400 Subject: [PATCH 01/22] spelling: above Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/ext/nlohmann/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdns/ext/nlohmann/json.hpp b/tdns/ext/nlohmann/json.hpp index 1e7cf51..5eecb9d 100644 --- a/tdns/ext/nlohmann/json.hpp +++ b/tdns/ext/nlohmann/json.hpp @@ -850,7 +850,7 @@ Exceptions have ids 1xx. name / id | example message | description ------------------------------ | --------------- | ------------------------- json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. -json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. From 87ed4892be556d0715103d3e55550b34cbaf8f62 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:03:14 -0400 Subject: [PATCH 02/22] spelling: addresses Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/c-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdns/c-api.md b/tdns/c-api.md index 916ce3f..9064de3 100644 --- a/tdns/c-api.md +++ b/tdns/c-api.md @@ -47,7 +47,7 @@ An error is indicated by a non-zero return value, in which case the error is available through `TDNSErrorMessage`. Actual IP addresses, IPv4 or IPv6, are returned as `struct sockaddr_storage` -pointers in `TDNSIpAddressess::addresses`: +pointers in `TDNSIpAddresses::addresses`: ``` for(int n = 0; ips->addresses[n]; ++n) { @@ -61,7 +61,7 @@ pointers in `TDNSIpAddressess::addresses`: } freeTDNSIPAddresses(ips); ``` -The sequence is terminated by a 0 pointer in `addressses`. Note that the +The sequence is terminated by a 0 pointer in `addresses`. Note that the answer must also be freed with `freeTDNSIPAddresses`. ## MX Records From 83a68f23b1ac62f3cf32796c08fe56d5cd000ef3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:39:24 -0400 Subject: [PATCH 03/22] spelling: anymore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/Doxyfile | 2 +- tdns/ext/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tdns/Doxyfile b/tdns/Doxyfile index 2e0a132..3892a6f 100644 --- a/tdns/Doxyfile +++ b/tdns/Doxyfile @@ -204,7 +204,7 @@ QT_AUTOBRIEF = NO # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. +# not recognized anymore. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO diff --git a/tdns/ext/nlohmann/json.hpp b/tdns/ext/nlohmann/json.hpp index 5eecb9d..c90a0dd 100644 --- a/tdns/ext/nlohmann/json.hpp +++ b/tdns/ext/nlohmann/json.hpp @@ -13865,7 +13865,7 @@ class basic_json the range `[first, last)` is undefined. @throw invalid_iterator.204 if iterators @a first and @a last belong to a primitive type (number, boolean, or string), but @a first does not point - to the first element any more. In this case, the range `[first, last)` is + to the first element anymore. In this case, the range `[first, last)` is undefined. See example code below. @throw invalid_iterator.206 if iterators @a first and @a last belong to a null value. In this case, the range `[first, last)` is undefined. From 3bd2df304e981453281214e619fa6402283bf992 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:39:53 -0400 Subject: [PATCH 04/22] spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- resolver.md | 2 +- tdns/ext/nlohmann/json.hpp | 22 +++++++++++----------- tdns/tauth.md | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/resolver.md b/resolver.md index 8a5084d..9a3214d 100644 --- a/resolver.md +++ b/resolver.md @@ -90,7 +90,7 @@ and terminate the algorithm. # Security At every point a resolver must be vigilant to not store data coming from an -authoritative server that can not be trusted to provide that data. +authoritative server that cannot be trusted to provide that data. In addition, if a cache is used, care must be taken that an authoritative server must not be allowed to 'extend its own authority' infinitely. This is diff --git a/tdns/ext/nlohmann/json.hpp b/tdns/ext/nlohmann/json.hpp index c90a0dd..5a2ab56 100644 --- a/tdns/ext/nlohmann/json.hpp +++ b/tdns/ext/nlohmann/json.hpp @@ -1046,7 +1046,7 @@ json.exception.out_of_range.401 | array index 3 is out of range | The provided a json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. -json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' cannot be applied to the root element of the JSON value. json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | @@ -8210,7 +8210,7 @@ class binary_reader @return whether string creation completed - @note We can not reserve @a len bytes for the result, because @a len + @note We cannot reserve @a len bytes for the result, because @a len may be too large. Usually, @ref unexpect_eof() detects the end of the input before we run out of string memory. */ @@ -11797,7 +11797,7 @@ class json_pointer @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved */ BasicJsonType& get_unchecked(BasicJsonType* ptr) const { @@ -11873,7 +11873,7 @@ class json_pointer @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved */ BasicJsonType& get_checked(BasicJsonType* ptr) const { @@ -11938,7 +11938,7 @@ class json_pointer @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved */ const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const { @@ -11997,7 +11997,7 @@ class json_pointer @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved */ const BasicJsonType& get_checked(const BasicJsonType* ptr) const { @@ -19403,7 +19403,7 @@ class basic_json @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved @liveexample{The behavior is shown in the example.,operatorjson_pointer} @@ -19431,7 +19431,7 @@ class basic_json @throw parse_error.106 if an array index begins with '0' @throw parse_error.109 if an array index was not a number @throw out_of_range.402 if the array index '-' is used - @throw out_of_range.404 if the JSON pointer can not be resolved + @throw out_of_range.404 if the JSON pointer cannot be resolved @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} @@ -19468,7 +19468,7 @@ class basic_json @throw out_of_range.403 if the JSON pointer describes a key of an object which cannot be found. See example below. - @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + @throw out_of_range.404 if the JSON pointer @a ptr cannot be resolved. See example below. @exceptionsafety Strong guarantee: if an exception is thrown, there are no @@ -19511,7 +19511,7 @@ class basic_json @throw out_of_range.403 if the JSON pointer describes a key of an object which cannot be found. See example below. - @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + @throw out_of_range.404 if the JSON pointer @a ptr cannot be resolved. See example below. @exceptionsafety Strong guarantee: if an exception is thrown, there are no @@ -19571,7 +19571,7 @@ class basic_json @return the original JSON from a flattened version @note Empty objects and arrays are flattened by @ref flatten() to `null` - values and can not unflattened to their original type. Apart from + values and cannot unflattened to their original type. Apart from this example, for a JSON value `j`, the following is always true: `j == j.flatten().unflatten()`. diff --git a/tdns/tauth.md b/tdns/tauth.md index ac1dc76..8c18936 100644 --- a/tdns/tauth.md +++ b/tdns/tauth.md @@ -238,7 +238,7 @@ packet: the 16 bit priority, followed by the name. ## A bit of fun: dynamic record contents -Although names can not easily be dynamic within the DNS tree (either they +Although names cannot easily be dynamic within the DNS tree (either they exist or they don't), contents can be changed at will. `tdns` defines a `time.tdns.powerdns.org` node which has a `ClockTXTGen`: From 6dc423bb8345e3f4a68c67dbc017fa160f300c4f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:40:46 -0400 Subject: [PATCH 05/22] spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- basic.md | 2 +- tdns/dns-storage.hh | 2 +- tdns/ext/catch/catch.hpp | 4 ++-- tdns/intro.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basic.md b/basic.md index a8cfb1e..cacf752 100644 --- a/basic.md +++ b/basic.md @@ -150,7 +150,7 @@ save a lot of pain when processing DNS names with spaces or dots in them. Finally, DNS queries are [case-insensitive](https://tools.ietf.org/html/rfc4343). This however is defined rather mechanically, and limited to ASCII. Operators do not need to know that in some -encodings a Ü is equivalent to ü when compared case insensitively. +encodings a Ü is equivalent to ü when compared case-insensitively. For DNS purposes, the fifth bit (0x20) is ignored when comparing octets within a-z and A-Z. diff --git a/tdns/dns-storage.hh b/tdns/dns-storage.hh index 514bbc5..840ead9 100644 --- a/tdns/dns-storage.hh +++ b/tdns/dns-storage.hh @@ -102,7 +102,7 @@ public: if(d_s.size() > 63) throw std::out_of_range("label too long"); } - //! Equality and comparison are case insensitive + //! Equality and comparison are case-insensitive bool operator<(const DNSLabel& rhs) const { return std::lexicographical_compare(d_s.begin(), d_s.end(), rhs.d_s.begin(), rhs.d_s.end(), charcomp); diff --git a/tdns/ext/catch/catch.hpp b/tdns/ext/catch/catch.hpp index ecd8907..b4c3206 100644 --- a/tdns/ext/catch/catch.hpp +++ b/tdns/ext/catch/catch.hpp @@ -8043,7 +8043,7 @@ namespace Matchers { } std::string CasedString::caseSensitivitySuffix() const { return m_caseSensitivity == CaseSensitive::No - ? " (case insensitive)" + ? " (case-insensitive)" : std::string(); } @@ -8100,7 +8100,7 @@ namespace Matchers { } std::string RegexMatcher::describe() const { - return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case insensitively"); + return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case-insensitively"); } } // namespace StdString diff --git a/tdns/intro.md b/tdns/intro.md index 07d7dd2..76e9634 100644 --- a/tdns/intro.md +++ b/tdns/intro.md @@ -181,7 +181,7 @@ surprisingly well! ## Putting the tricky bits at a fundamental level DNS names look surprisingly like text strings, but they very much are not. -For starters, DNS is case insensitive in its own special way, and such rules +For starters, DNS is case-insensitive in its own special way, and such rules must be obeyed for DNSSEC to ever work. Furthermore, despite appearances, DNS is 8-bit safe. This means that @@ -189,7 +189,7 @@ individual DNS labels (usually separated by dots) can contain embedded 0 characters, but also actual dots themselves. A lot of code 'up the stack' can be simplified by having basic types that -are fully DNS native, like DNS Labels which are case insensitive, stored in +are fully DNS native, like DNS Labels which are case-insensitive, stored in binary and length limited by themselves. Code that uses "strings" for DNS may struggle to recognize (in all places!) From 6449fb140734a9b9831f57a1805c10b1384874d5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:40:55 -0400 Subject: [PATCH 06/22] spelling: case-sensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/Doxyfile | 2 +- tdns/ext/catch/catch.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tdns/Doxyfile b/tdns/Doxyfile index 3892a6f..5e9176c 100644 --- a/tdns/Doxyfile +++ b/tdns/Doxyfile @@ -520,7 +520,7 @@ INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# in case and if your file system supports case-sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. diff --git a/tdns/ext/catch/catch.hpp b/tdns/ext/catch/catch.hpp index b4c3206..d9b49ea 100644 --- a/tdns/ext/catch/catch.hpp +++ b/tdns/ext/catch/catch.hpp @@ -8100,7 +8100,7 @@ namespace Matchers { } std::string RegexMatcher::describe() const { - return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case-insensitively"); + return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case-sensitively" : " case-insensitively"); } } // namespace StdString From 05d4b8867bc0bb91b94ae12e2e2ce10b9771ee8c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:37:58 -0400 Subject: [PATCH 07/22] spelling: command Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdns/Doxyfile b/tdns/Doxyfile index 5e9176c..7c0fad9 100644 --- a/tdns/Doxyfile +++ b/tdns/Doxyfile @@ -685,7 +685,7 @@ SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the +# popen()) the command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. From 44fdadfc7eebde81f3844cae75bb16155b2cbc9c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:06:28 -0400 Subject: [PATCH 08/22] spelling: details Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tdns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdns/README.md b/tdns/README.md index a8b9cb9..673d11a 100644 --- a/tdns/README.md +++ b/tdns/README.md @@ -344,7 +344,7 @@ $ dig -t any time.powerdns.org @::1 -p 5300 +short time.powerdns.org. 3600 IN TXT "The time is Fri, 13 Apr 2018 12:55:54 +0200" ``` -For more detauls, read on about [`tauth`](tauth.md.html), [`tres`](tres.md.html) +For more details, read on about [`tauth`](tauth.md.html), [`tres`](tres.md.html) or the [C API](c-api.md.html).