-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is too easy to accidentally log message contents in rageshakes #26380
Labels
A-Developer-Experience
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
T-Task
Tasks for the team like planning
Comments
germain-gg
added
T-Task
Tasks for the team like planning
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
A-Developer-Experience
O-Occasional
Affects or can be seen by some users regularly or most users rarely
labels
Oct 17, 2023
On the known call sites of
|
richvdh
added a commit
to matrix-org/matrix-react-sdk
that referenced
this issue
Oct 17, 2023
Part of the solution to element-hq/element-web#26380: `toJSON` is dangerous, and I'd like to kill it off. There is no need for it here; it is simpler to call `getEffectiveEvent` directly.
richvdh
added a commit
to matrix-org/matrix-js-sdk
that referenced
this issue
Oct 17, 2023
Per element-hq/element-web#26380, this method is too easy to use accidentally, and per the comments, it doesn't even return a meaningful JSON-serialisation of the object.
github-merge-queue bot
pushed a commit
to matrix-org/matrix-react-sdk
that referenced
this issue
Oct 17, 2023
Part of the solution to element-hq/element-web#26380: `toJSON` is dangerous, and I'd like to kill it off. There is no need for it here; it is simpler to call `getEffectiveEvent` directly.
github-merge-queue bot
pushed a commit
to matrix-org/matrix-js-sdk
that referenced
this issue
Oct 17, 2023
* Deprecate `MatrixEvent.toJSON` Per element-hq/element-web#26380, this method is too easy to use accidentally, and per the comments, it doesn't even return a meaningful JSON-serialisation of the object. * Update src/models/event.ts
I now believe there are no legitimate callers of |
I'd love not to be responsible for taking this further :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Developer-Experience
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
T-Task
Tasks for the team like planning
There have been numerous occasions over the years where we accidentally include message contents in rageshakes, most recently #26376.
A common failure mode is to write something like:
What happens then is that we call
JSON.stringify
(https://github.com/matrix-org/matrix-react-sdk/blob/v3.82.0/src/rageshake/rageshake.ts#L94) which in turn callsMatrixEvent.toJSON
, which includes the message content.I assert that we should either:
MatrixEvent.toJSON
to use some other method, then updatetoJSON
to elide message contentMatrixEvent
in rageshake.logThe text was updated successfully, but these errors were encountered: