Skip to content

Commit 1da8bab

Browse files
turt2livedbkruhoreg
authored
MSC4077: Improved process for handling deprecated HTML features (#4077)
* MSC: Improved process for handling deprecated HTML features * <3 spellcheck * Apply suggestions from code review Co-authored-by: David Baker <[email protected]> Co-authored-by: Hubert Chathi <[email protected]> --------- Co-authored-by: David Baker <[email protected]> Co-authored-by: Hubert Chathi <[email protected]>
1 parent 6769396 commit 1da8bab

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# MSC4077: Improved process for handling deprecated HTML features
2+
3+
The Matrix specification [defines](https://spec.matrix.org/v1.8/client-server-api/#mroommessage-msgtypes)
4+
a subset of HTML which clients *should* use when rendering messages, limiting the possibility for
5+
Cross-Site Scripting (XSS) and similar attacks. Clients are always welcome to use a different subset
6+
in both their send and receive paths, however in practice the recommended set of HTML has become the
7+
baseline standard for support among Matrix client developers.
8+
9+
Additionally, to fix issues like [tags being deprecated](https://github.com/matrix-org/matrix-spec/issues/1492),
10+
the existing spec process would require an entire MSC to add or remove the tag. This has precedent
11+
through [MSC2422](https://github.com/matrix-org/matrix-spec-proposals/pull/2422) and
12+
[MSC2184](https://github.com/matrix-org/matrix-spec-proposals/pull/2184), where additional HTML
13+
features are analyzed from a security perspective. For example, whether XSS attacks are more probable
14+
or flooding/disruption attempts are made easier.
15+
16+
This proposal adjusts the MSC process to explicitly allow changes to the supported HTML tags where
17+
the WHATWG has deprecated a feature in favour of another, enabling more rapid iteration and reducing
18+
paperwork for everyone involved.
19+
20+
## Proposal
21+
22+
Where the WHATWG has deprecated a feature of the HTML specification, a Matrix spec PR *may* bypass the
23+
MSC process to use the modern feature instead. In the case of [issue#1492](https://github.com/matrix-org/matrix-spec/issues/1492),
24+
the spec PR is explicitly able to add the `s` tag and remove the `strike` tag. Note that such changes
25+
can also bypass the [deprecation policy](https://spec.matrix.org/v1.8/#deprecation-policy) in this way.
26+
27+
It is left to the discretion of the spec PR reviewer as to whether an MSC is required. In general, an
28+
MSC should be requested when the replacement HTML feature is not quite the same as the old feature.
29+
The reviewer *may* also decide whether to keep supporting the old, deprecated, feature for some time.
30+
For example, replacing `strike` with `s` may mean that both tags are supported for 1-2 Matrix spec
31+
versions before `strike` can be dropped.
32+
33+
For clarity, an MSC is always required to add net-new features to the HTML subset, or to remove a
34+
feature entirely. An example of this is [MSC2398](https://github.com/matrix-org/matrix-spec-proposals/pull/2398).
35+
These changes are subject to interoperability and security review, and cannot bypass the MSC process.
36+
37+
## Potential issues
38+
39+
The author notes that this MSC might not need to exist under the banner of pragmatism, however for all
40+
the effort to *not* write an MSC, an MSC has been written for review.
41+
42+
## Alternatives
43+
44+
Critically, without agreement that replacing deprecated HTML features can happen outside the MSC process,
45+
changes to the HTML subset become slow and burdensome for no apparent gain.
46+
47+
## Security considerations
48+
49+
Special care and attention is expected to be taken by spec PR reviewers to ensure that changes are
50+
safe and in line with the semantics of this proposal's guidance.
51+
52+
## Unstable prefix
53+
54+
Not applicable. This is a process MSC.
55+
56+
## Dependencies
57+
58+
None applicable.

0 commit comments

Comments
 (0)