Repository navigation
Conversation
|
|
barodeur
left a comment
There was a problem hiding this comment.
I'm not sure that this really adds much value to Synapse.
The ?to parameter has been ignored voluntarily since the initial implementation matrix-org/synapse#13345.
| # We want to enforce they do pass us one, but we ignore it and return | ||
| # changes after the "to" as well as before. | ||
| # | ||
| # XXX This does not enforce that "to" is passed. | ||
| set_tag("to", str(parse_string(request, "to"))) | ||
| # The spec requires `to` to be passed. We enforce that, but otherwise | ||
| # ignore it and return changes after the "to" as well as before. | ||
| set_tag("to", parse_string(request, "to", required=True)) |
There was a problem hiding this comment.
As per @MadLittleMods suggestion, I'm making sure my review comment is discussable a github discussion:
I'm not sure that this really adds much value to Synapse.
The
?toparameter has been ignored voluntarily since the initial implementation matrix-org/synapse#13345.
Fixes #3058.
The Matrix spec marks the
toquery parameter ofGET /_matrix/client/v3/keys/changesas required, but Synapse accepted requests without it (a long-standingXXXcomment in the code noted this). It is now required, so a request withouttogets a 400M_MISSING_PARAM. As before, the value is otherwise ignored.Behaviour change to be aware of: a client that omitted
topreviously succeeded and will now get a 400. The spec already requires the parameter, but maintainers may want to weigh whether that is acceptable.Added
test_missing_to_paramintests/rest/client/test_keys.py.Checked:
trial tests.rest.client.test_keys(11 passed),ruff check,ruff format --checkandmypyon the touched files, run on Linux against this branch. Not run: Postgres variants, complement.AI disclosure: this change was written with the help of Claude (Anthropic) on behalf of the submitter, who is responsible for it. The tests and linters above were actually run.
Pull Request Checklist