mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-12-06 20:52:06 +08:00
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>
5 lines
235 B
Plaintext
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
|