Files
ocserv/.codespellrc
Nikos Mavrogiannopoulos 8248accbc9 occtl: always produce valid JSON
With --json, occtl wrote list values (DNS, NBNS, split-DNS domains,
routes, no-routes, iroutes) without escaping them, so a value containing
a quote made the output invalid JSON, and values longer than about 505
bytes were replaced by the literal "(invalid)". json_escape_val() also
passed the escaped control character to snprintf() as a signed char.

Escape every string through one helper, print_json_string(), which
sizes its buffer with JSON_ESCAPED_SIZE() from the value's length; and
convert the escaped byte through unsigned char as well.

The tests use "café" as a UTF-8 value; add "caf" to codespell's
ignore list.

Fixes the violation of REQ-OCCTL-CLI-009.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-11-11 23:32:24 +01:00

5 lines
235 B
Plaintext

[codespell]
skip = ./.git,aclocal.m4,./autom4te.cache,./build-aux,config.log,ccan,pcl,*.pem,./src/ocserv-fw-nftables,./tests/test-fw-script
ignore-words-list = alloced,ans,anull,bu,caf,gir,siz,te,chage
uri-ignore-words-list = gord,ist