Stricter mxc/mxid validation #105

Merged
cadence merged 2 commits from l1s5/out-of-your-element:stricter-mxc-mxid-validation into main 2026-11-04 10:23:31 +00:00

2 commits

Author SHA1 Message Date
c70597a665
matrix: stricter mxid validation
This commit refactors various instances of mxid matching so that there
is a single well-tested regex that can be reused everywhere. The new
regex is made to match the specification word for word, and should
hopefully rule out most over- and undermatching.

By chance, this also fixes a bug in `src/discord/interactions/ping.js`
where the autocomplete tried matching an mxid against a raw sql query
rather than the provided input.
2026-11-04 05:53:33 +09:00
1bf53e2701
matrix: stricter mxc validation
This commit refactors various instances of mxc matching so that there
is a single well-tested regex that can be reused everywhere. The new
regex is made to match the specification word for word, and should
hopefully rule out most over- and undermatching.
2026-11-04 05:53:31 +09:00