matrix-org / matrix-org/matrix-bifrost
Private messages in MUC don't get sent to the right resource if it contains certain characters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 187
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Bifrost seems to be mangling and/or prepping incorrectly certain characters when sending stanzas.
**To Reproduce**
Steps to reproduce the behavior:
1. Join xmpp@chat.yax.im
2. Attempt to privately message jonas’
3. Message gets sent to "jonas 19" which doesn't exist
**Expected behavior**
The message should be sent to jonas’
**Additional context**
Some logs about the issue
Bifrost:
Jul-29 08:19:05.390 INFO MatrixEventHandler Handling IM message
Jul-29 08:19:05.391 INFO MatrixEventHandler Sending IM to xmpp@chat.yax.im/jonas 19
Jul-29 08:19:05.392 INFO XmppJsGateway Looking up possible gateway: @maranda:aria-net.org xmpp@chat.yax.im/jonas 19 xmpp@chat.yax.im
XMPP Server:
Jul 29 08:19:05 jcp55df4cc03bb0 debug Received[component]:
Jul 29 08:19:05 s2sout55df4b10b5c0 debug sending:
Jul 29 08:19:05 s2sout55df4b10b5c0 debug Received[s2sout]:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the private-message path through the MatrixEventHandler and XmppJsGateway entries shown in the logs, then reproduce the case with the resource name jonas’. Done means the generated XMPP stanza preserves the intended resource and the private message reaches jonas’ instead of jonas 19.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100