Skip to content

feat(juce): let an integration append its own client info segment - #30

Merged
TobbenTM merged 1 commit into
mainfrom
juce-module-client-info
Sep 16, 2026
Merged

TobbenTM merged 1 commit into
mainfrom
juce-module-client-info

Conversation

@TobbenTM

Copy link
Copy Markdown
Member

ActivationConfig gains a clientInfo field whose value is appended to the User-Agent after the module's own moonbase-juce/<version> segment rather than replacing it, so a framework built on top of the module (HISE, a wrapper, a white-label host) can identify itself: moonbase-cpp/4.3.1 moonbase-juce/4.3.1 (JUCE v8.0.4; macOS 15.2) HISE/4.1.0. The module's own segment moved into a resolvedClientInfo() helper, matching the existing resolvedX() convention and making it testable without building licensing_options.

The core SDK now sanitises client_info when it builds the header (control characters become spaces, whitespace runs collapse, capped at 256 characters), which closes a header-injection path: both shipped transports splice headers into a single line, and the emptiness check now runs after sanitising so a segment that sanitises away leaves no trailing space. Docs cover the new field in docs/juce-module.md and the module README, and client_info is now documented in docs/core-sdk.md, where it was missing entirely.

Tests: six subcases in tests/client_tests.cpp (layer ordering, CRLF, embedded NUL, whitespace-only, whitespace collapsing, the cap), two JUCE cases covering the config surface and the value reaching the wire sanitised, and a User-Agent assertion added to the inventory path. Core suite 112/112 and JUCE suite 60/60 pass locally.

ActivationConfig gains a `clientInfo` field, appended to the User-Agent
after the module's own `moonbase-juce/<version>` segment rather than
replacing it, so a framework built on the module (HISE, a wrapper, a
white-label host) can identify itself:

  moonbase-cpp/4.3.1 moonbase-juce/4.3.1 (JUCE v8.0.4; macOS 15.2) HISE/4.1.0

The SDK now sanitises `client_info` when it builds the header: control
characters become spaces, whitespace runs collapse, and the segment is
capped at 256 characters. Both shipped transports splice headers into a
single line, so a CR/LF in a caller-supplied value could otherwise inject
a header. The emptiness check runs after sanitising, so a segment that
sanitises away leaves no trailing space.
@argos-ci

argos-ci Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Sep 16, 2026, 9:47 AM

@TobbenTM
TobbenTM merged commit 8ced84e into main Sep 16, 2026
16 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 16, 2026
# [4.4.0](v4.3.1...v4.4.0) (2026-09-16)

### Features

* **juce:** let an integration append its own client info segment ([#30](#30)) ([8ced84e](8ced84e))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant