Skip to content

Commit 13fb97c

Browse files
authored
Bump GMSL to pull in v12 sorting bugfix (#3633)
Also keeps processing PDUs even if one of them was bad c.f element-hq/synapse#7543 suspect moderation tooling is causing invalid PDUs to be sent, meaning this is now expected to fail: ``` FAILURE: #655: Server rejects invalid JSON in a version 6 room ```
1 parent 0945374 commit 13fb97c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/matrix-org/dugong v0.0.0-20210921133753-66e6b1c67e2e
2626
github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91
2727
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530
28-
github.com/matrix-org/gomatrixserverlib v0.0.0-20250811193806-b7e0e0824751
28+
github.com/matrix-org/gomatrixserverlib v0.0.0-20250813123338-6029db28e244
2929
github.com/matrix-org/pinecone v0.11.1-0.20230810010612-ea4c33717fd7
3030
github.com/matrix-org/util v0.0.0-20221111132719-399730281e66
3131
github.com/mattn/go-sqlite3 v1.14.28

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 h1:kHKxCOLcHH8
239239
github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s=
240240
github.com/matrix-org/gomatrixserverlib v0.0.0-20250811193806-b7e0e0824751 h1:x1pC7Nt1Qb24q9WtPybMHWo2uVFTzCKtlUAzarju8bk=
241241
github.com/matrix-org/gomatrixserverlib v0.0.0-20250811193806-b7e0e0824751/go.mod h1:b6KVfDjXjA5Q7vhpOaMqIhFYvu5BuFVZixlNeTV/CLc=
242+
github.com/matrix-org/gomatrixserverlib v0.0.0-20250813123338-6029db28e244 h1:7pKFuVhn2JkrQBhH14fsIbTd/uBjC5Xu6aIo13oMBEI=
243+
github.com/matrix-org/gomatrixserverlib v0.0.0-20250813123338-6029db28e244/go.mod h1:b6KVfDjXjA5Q7vhpOaMqIhFYvu5BuFVZixlNeTV/CLc=
242244
github.com/matrix-org/pinecone v0.11.1-0.20230810010612-ea4c33717fd7 h1:6t8kJr8i1/1I5nNttw6nn1ryQJgzVlBmSGgPiiaTdw4=
243245
github.com/matrix-org/pinecone v0.11.1-0.20230810010612-ea4c33717fd7/go.mod h1:ReWMS/LoVnOiRAdq9sNUC2NZnd1mZkMNB52QhpTRWjg=
244246
github.com/matrix-org/util v0.0.0-20221111132719-399730281e66 h1:6z4KxomXSIGWqhHcfzExgkH3Z3UkIXry4ibJS4Aqz2Y=

internal/transactionrequest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ func (t *TxnReq) ProcessTransaction(ctx context.Context) (*fclient.RespSend, *ut
134134
}
135135
event, err := verImpl.NewEventFromUntrustedJSON(pdu)
136136
if err != nil {
137+
/* Do not reject the entire transaction for a single bad PDU, that's dumb.
138+
137139
if _, ok := err.(gomatrixserverlib.BadJSONError); ok {
138140
// Room version 6 states that homeservers should strictly enforce canonical JSON
139141
// on PDUs.
@@ -146,7 +148,7 @@ func (t *TxnReq) ProcessTransaction(ctx context.Context) (*fclient.RespSend, *ut
146148
Code: 400,
147149
JSON: spec.BadJSON("PDU contains bad JSON"),
148150
}
149-
}
151+
} */
150152
util.GetLogger(ctx).WithError(err).Debugf("Transaction: Failed to parse event JSON of event %s", string(pdu))
151153
continue
152154
}

0 commit comments

Comments
 (0)