Skip to content

Conversation

@l5yth
Copy link
Owner

@l5yth l5yth commented Jan 10, 2026

Sanitized the Matrix bridge startup log to avoid leaking appservice tokens, and moved Matrix auth to Authorization: Bearer headers on outbound requests while keeping the Synapse listener compatible with legacy query tokens. Updated the related tests to assert header-based auth and added coverage for legacy query and X-Access-Token headers.

  • matrix/src/main.rs logs only non-sensitive config fields via a dedicated helper, removing token exposure.
  • matrix/src/matrix.rs sends appservice auth via bearer_auth and adjusts mock expectations accordingly.
  • matrix/src/matrix_server.rs accepts Authorization: Bearer or X-Access-Token headers with constant-time token comparison and falls back to query params only when headers are missing; tests updated to cover header and legacy paths.

@codecov
Copy link

codecov bot commented Jan 10, 2026

Codecov Report

❌ Patch coverage is 95.58824% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
matrix/src/matrix_server.rs 92.68% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@l5yth l5yth merged commit 60e7340 into main Jan 10, 2026
8 checks passed
@l5yth l5yth deleted the l5y-matrix-tokens branch January 10, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants