fix(cli): decode the REST CLI answer
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 49s
driver / lowest (pull_request) Successful in 24s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m25s
driver / publish (pull_request) Skipped

Over the REST API, cli() returned the /cli endpoint's
result_base64_encoded field as it came: base64 instead of the command's
output. It now decodes it and drops the NUL byte the switch ends it with,
in the same parser the SNMP read over REST uses.

New finding, confirmed by the show snmp-server answer recorded from a
ProCurve switch; no issue filed.
This commit is contained in:
Christian Manivong committed 2026-11-01 22:17:59 +01:00
1 parent 03cf40de99
commit 1d5399e51b
5 files changed
+56 -5

No files matched your search

+2
View File
@@ -17,6 +17,8 @@ All notable changes to this driver. The format follows
a session log object, which older releases do not accept.
### Fixed
- `cli()` over the REST API returns the command's output. It returned the API's
base64 encoding of it as it came, NUL byte included.
- `configure_snmp_agent` over the REST API opens its temporary SSH session on port 22.
It used `optional_args["port"]`, which names the REST API's port when REST is the
transport, so the SNMP setup failed on switches managed over REST.