v0.1.4 — endpoint URLs never reach a log
A security fix for one issue, reported by @textagroup (Kirk Mayo) as #1. Thank you.
Endpoint override URLs are no longer repeated back into errors, logs, or the test-email response
Endpoint::normalise() refused an unsafe graph_base_url / login_base_url correctly, but ended its message with the rejected value verbatim — and that message was then logged by GraphTransport at error level and returned to the superuser by Missivus.sendTestEmail, neither with a final redaction pass.
So a base URL carrying credentials (https://user:password@host) or a token (?access_token=…), set through MISSIVUS_GRAPH_BASE_URL or MISSIVUS_LOGIN_BASE_URL, could reach a Matomo log file and the settings page. Rated Low — it needs a misconfiguration the operator authored themselves, and both readers are already trusted surfaces — but it is a credential crossing a boundary it never needed to cross.
Fixed in three independent layers:
Endpointno longer assembles what it must not print. Every message is built from one helper that emits scheme, host, port and path only; userinfo, query string and fragment never enter a message at all. A value too malformed to parse, or a host name that fails validation, is reported by reason rather than by value.Redactorlearned URL shapes — credentials inside a URL (anchored on://, so an ordinary mailbox address is left alone), anyname=valueon the newRedactor::SECRET_PARAMSlist (access_token,client_secret,code,password,signature,sas, …), and URL fragments.GraphTransport::redact()is now the single final pass on every string the transport logs or rethrows, andMissivus.sendTestEmailapplies the same pass to the message it returns.
Eleven new tests cover it: userinfo, access_token / client_secret / code query parameters and fragments, all asserted absent from the exception message, from the log, and from the string the API method returns. 75 tests pass; php -l clean.
Full write-up as finding 12 in docs/SECURITY.md. No configuration change is needed on upgrade.
Install
Unzip Missivus-0.1.4.zip into Matomo's plugins/ directory, or upload it through Administration → Plugins → Install a plugin with enable_plugin_upload temporarily on.