Skip to content

vector.im identity server tries to contact homeserver on server_name instead of hostname #19304

@AndreKR

Description

@AndreKR

Description

Managing email addresses on the vector.im identity server fails when the server_name isn't the public_baseurl.

Steps to reproduce

On my Synapse homeserver I have set server_name to mydomain.tld and public_baseurl to https://matrix.mydomain.tld.

I have set up mydomain.tld/.well-known/matrix/server to respond with {"m.server": "matrix.mydomain.tld:443"} and mydomain.tld/.well-known/matrix/client to respond with {"m.homeserver": {"base_url": "https://matrix.mydomain.tld"}}.

Now I log into Element, go to All settings -> Security & Privacy. I see a spinner where the email addresses should be. In the console I see an error message:

M_UNKNOWN: MatrixError: [500] The Matrix homeserver returned invalid JSON (https://vector.im/_matrix/identity/v2/account/register)

When I check my webserver logs I see a request to https://mydomain.tld/_matrix/federation/v1/openid/userinfo?access_token=....

If I configure the webserver for mydomain.tld so that this request is forwarded to Synapse, then the Security & Privacy page starts working correctly.

However, I believe the identity server should not be contacting mydomain.tld at all, the request should go to https://matrix.mydomain.tld/_matrix/federation/v1/openid/userinfo?access_token=... instead.

Homeserver

Self-hosted Synapse

Synapse Version

1.144.0

Installation Method

Docker (matrixdotorg/synapse)

Database

SQLite

Workers

Single process

Platform

Docker on Ubuntu

Configuration

Just the generated YAML + email: config

Relevant log output

See above for the relevant error messages and URLs.

Anything else that would be useful to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions