matrix-org / matrix-org/matrix-bifrost

Stanza attribute escaping looks like a foot gun

Open
#99 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Defect
Dominant language
TypeScript
Stars
187
Forks
38
PR merge metrics
No merged PRs in 30d

Description

https://github.com/matrix-org/matrix-bifrost/blob/f2f28bb7f7b069b8491c822e54ad0eeab6d8d114/src/xmppjs/Stanzas.ts#L23-L27

This, escaping fields in a setter instead of during serialization, scares me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/xmppjs/Stanzas.ts around lines 23-27 and trace how stanza attributes are set and serialized. Determine how escaping should be handled without creating surprising setter behavior, then verify the resulting stanza output with the relevant existing checks, if any.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.