navidrome/plugins/cmd/ndpgen/internal
Deluan 9a004fd043 fix(plugins): correct Rust codegen serde attributes and harden endpoint responses
Fix two issues from PR #5045 review. The Rust code generator was
producing incorrect skip_serializing_if attributes: map types incorrectly
used Option::is_none instead of HashMap::is_empty, and the bare int type
for HTTPHandleResponse.Status fell through to the default Option::is_none
case. The map fix is in skipSerializingFunc; the int issue is fixed at the
source by changing Status from int to int32 (HTTP status codes always fit
in int32, and this avoids platform-dependent int sizing on i386 vs amd64).

Additionally, plugin HTTP responses now include forced security headers
(X-Content-Type-Options: nosniff and a restrictive Content-Security-Policy
with sandbox) to prevent XSS from compromised plugins serving HTML+JS on
the same origin as Navidrome.
2026-02-13 13:43:41 -05:00
..
templates feat(plugins): add SubsonicAPI CallRaw, with support for raw=true binary response for host functions (#4982) 2026-02-04 15:48:08 -05:00
generator.go fix(plugins): correct Rust codegen serde attributes and harden endpoint responses 2026-02-13 13:43:41 -05:00
generator_test.go fix(plugins): correct Rust codegen serde attributes and harden endpoint responses 2026-02-13 13:43:41 -05:00
internal_suite_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
parser.go feat(plugins): add SubsonicAPI CallRaw, with support for raw=true binary response for host functions (#4982) 2026-02-04 15:48:08 -05:00
parser_test.go feat(plugins): add SubsonicAPI CallRaw, with support for raw=true binary response for host functions (#4982) 2026-02-04 15:48:08 -05:00
pdk_parser.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
types.go feat(plugins): add SubsonicAPI CallRaw, with support for raw=true binary response for host functions (#4982) 2026-02-04 15:48:08 -05:00
xtp_schema.go feat(plugins): add similar songs retrieval functions and improve duration consistency (#4933) 2026-01-26 18:28:41 -05:00
xtp_schema.json feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
xtp_schema_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
xtp_schema_validate.go feat(plugins): add JSONForms-based plugin configuration UI (#4911) 2026-01-19 20:51:00 -05:00