POST /_continuwuity/oauth2/client/register returns 200 with empty body #2023

Closed
opened 2026-07-19 21:11:29 +00:00 by tomsh · 2 comments

POST /_continuwuity/oauth2/client/register returns HTTP 200 but with a
completely empty response body (0 bytes), instead of a JSON object
containing client_id etc. per RFC 7591 / MSC2966.

This causes Element X to fail with:
"client registration failed: failed to deserialize registration
response: EOF while parsing value at line 1 column 0"

Important: this specifically affects Element X's develop branch, which
uses OIDC-based dynamic client registration (MSC2965) during login.
The current stable Element X release (Play Store / F-Droid) does NOT
attempt this flow and works fine against Continuwuity as-is. This bug
is currently "invisible" to most users, but will likely surface once
Element X's stable release adopts the same OIDC-first login flow that
the develop branch already uses.

Reproduction:
curl -s -o /tmp/resp.json -w "%{http_code}\n" -X POST
https:///_continuwuity/oauth2/client/register
-H "Content-Type: application/json"
-d '{"client_name":"test","redirect_uris":["https://element.io/callback"]}'

Result: HTTP 200, response body is 0 bytes (verified with wc -c).

Tested on Continuwuity v26.6.2 (latest release at time of testing).

Note: I've since migrated to Tuwunel for unrelated reasons, so I can't
easily test further iterations of a fix, but wanted to leave this
documented for others hitting the same issue.

POST /_continuwuity/oauth2/client/register returns HTTP 200 but with a completely empty response body (0 bytes), instead of a JSON object containing client_id etc. per RFC 7591 / MSC2966. This causes Element X to fail with: "client registration failed: failed to deserialize registration response: EOF while parsing value at line 1 column 0" Important: this specifically affects Element X's develop branch, which uses OIDC-based dynamic client registration (MSC2965) during login. The current stable Element X release (Play Store / F-Droid) does NOT attempt this flow and works fine against Continuwuity as-is. This bug is currently "invisible" to most users, but will likely surface once Element X's stable release adopts the same OIDC-first login flow that the develop branch already uses. Reproduction: curl -s -o /tmp/resp.json -w "%{http_code}\n" -X POST \ https://<server>/_continuwuity/oauth2/client/register \ -H "Content-Type: application/json" \ -d '{"client_name":"test","redirect_uris":["https://element.io/callback"]}' Result: HTTP 200, response body is 0 bytes (verified with wc -c). Tested on Continuwuity v26.6.2 (latest release at time of testing). Note: I've since migrated to Tuwunel for unrelated reasons, so I can't easily test further iterations of a fix, but wanted to leave this documented for others hitting the same issue.
ginger self-assigned this 2026-07-19 21:28:31 +00:00
ginger added this to the 26.7.0 milestone 2026-07-25 13:59:21 +00:00
Owner

Cannot reproduce on main (a0fa4cf0fe):

$ curl -s -o /tmp/resp.json -w "%{http_code}\n" -X POST https://nexy7574.co.uk:8448/_continuwuity/oauth2/client/register --json '{"client_name":"test","redirect_uris":["https://element.io/callback"]}'
422

$ cat /tmp/resp.json 
Failed to deserialize the JSON body into the target type: missing field `client_uri` at line 1 column 70

$ curl -i -X POST https://nexy7574.co.uk:8448/_continuwuity/oauth2/client/register --json '{"client_name":"test","client_uri":"https://element.io", "redirect_uris":["https://element.io/callback"]}'

HTTP/2 201 
access-control-allow-origin: *
alt-svc: h3=":8448"; ma=2592000
content-security-policy: default-src 'none';frame-ancestors 'none';form-action 'none';base-uri 'none';sandbox
content-type: application/json
date: Mon, 27 Jul 2026 14:06:07 GMT
origin-agent-cluster: ?1
permissions-policy: interest-cohort=(),browsing-topics=()
strict-transport-security: max-age=31536000; includeSubDomains; preload
vary: accept-encoding
via: 2.0 Caddy
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 0

{"client_id":"Z1Ij1iXFBelhIMb7q8fn80XZgQtPDo87I004iEVUiDY=","application_type":"web","client_name":"test","client_uri":"https://element.io/","grant_types":[],"redirect_uris":["https://element.io/callback"],"response_types":[]}
Cannot reproduce on main (a0fa4cf0fe039dfc9275a15dfe645ed245b035f1): ``` $ curl -s -o /tmp/resp.json -w "%{http_code}\n" -X POST https://nexy7574.co.uk:8448/_continuwuity/oauth2/client/register --json '{"client_name":"test","redirect_uris":["https://element.io/callback"]}' 422 $ cat /tmp/resp.json Failed to deserialize the JSON body into the target type: missing field `client_uri` at line 1 column 70 $ curl -i -X POST https://nexy7574.co.uk:8448/_continuwuity/oauth2/client/register --json '{"client_name":"test","client_uri":"https://element.io", "redirect_uris":["https://element.io/callback"]}' HTTP/2 201 access-control-allow-origin: * alt-svc: h3=":8448"; ma=2592000 content-security-policy: default-src 'none';frame-ancestors 'none';form-action 'none';base-uri 'none';sandbox content-type: application/json date: Mon, 27 Jul 2026 14:06:07 GMT origin-agent-cluster: ?1 permissions-policy: interest-cohort=(),browsing-topics=() strict-transport-security: max-age=31536000; includeSubDomains; preload vary: accept-encoding via: 2.0 Caddy x-content-type-options: nosniff x-frame-options: DENY x-xss-protection: 0 {"client_id":"Z1Ij1iXFBelhIMb7q8fn80XZgQtPDo87I004iEVUiDY=","application_type":"web","client_name":"test","client_uri":"https://element.io/","grant_types":[],"redirect_uris":["https://element.io/callback"],"response_types":[]} ```
Owner

Closing the issue since it has either been fixed since 26.6.2 or was a misconfiguration on the author's side, and and per the issue, won't be able to confirm the resolution.

Closing the issue since it has either been fixed since 26.6.2 or was a misconfiguration on the author's side, and and per the issue, won't be able to confirm the resolution.
nex closed this issue 2026-07-27 14:10:28 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2023
No description provided.