You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/3757-restricting-who-can-overwrite-a-state-event.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,12 +71,31 @@ Since `:` is not permitted in the localpart and `_` is not permitted in the doma
71
71
72
72
## Potential issues
73
73
74
+
### Incompatibility with long user IDs
75
+
74
76
As the spec enforces [a size limit of 255 bytes for both MXIDs and state keys](https://spec.matrix.org/unstable/client-server-api/#size-limits),
75
77
the set of available MXID-prefixed state keys is smaller for long MXIDs than for short ones,
76
78
with the worst case of none being available for MXIDs equal to the size limit.
77
79
Thus, long MXIDs are restricted from being used as state key prefixes to designate state ownership.
78
80
This issue could be solved by increasing the size limit for state keys.
79
81
82
+
### Incompatibility with domain names containing underscores
83
+
84
+
Although both [the spec](https://spec.matrix.org/unstable/appendices/#server-name)
85
+
and [RFC 1035 §2.3.1](https://www.rfc-editor.org/rfc/rfc1035#section-2.3.1)
86
+
forbid the presence of underscores in domain names,
87
+
there noneless exist resolvable domain names that contain underscores.
88
+
The proposed auth rule for parsing an MXID prefix from an underscore-separated state key would fail
89
+
on such domain names.
90
+
91
+
Possible solutions include:
92
+
- using a different character to terminate an MXID prefix in state keys. The character must be one
93
+
that's known to be absent from domain names in practice, and must also not be any character that
94
+
the spec allows to appear in a server name.
95
+
- refining the proposed auth rule for parsing an MXID prefix such that it does not fail on domain
96
+
names that contain an underscore. One way to achieve this is to leverage the absense of
97
+
underscores from top-level domains.
98
+
80
99
## Alternatives
81
100
82
101
As originally proposed in [MSC3489](https://github.com/matrix-org/matrix-spec-proposals/pull/3489) and [MSC3672](https://github.com/matrix-org/matrix-spec-proposals/pull/3672), we can require
0 commit comments