Skip to content

v0.1.4 — endpoint URLs never reach a log

Choose a tag to compare

@rubendossantos rubendossantos released this 18 Aug 07:01
· 5 commits to main since this release

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:

  • Endpoint no 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.
  • Redactor learned URL shapes — credentials inside a URL (anchored on ://, so an ordinary mailbox address is left alone), any name=value on the new Redactor::SECRET_PARAMS list (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, and Missivus.sendTestEmail applies 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.