Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Start a conversation by inviting a bound email address fails #7660

Closed
giomfo opened this issue Jun 9, 2020 · 3 comments
Closed

Start a conversation by inviting a bound email address fails #7660

giomfo opened this issue Jun 9, 2020 · 3 comments
Labels
z-bug (Deprecated Label)

Comments

@giomfo
Copy link
Member

giomfo commented Jun 9, 2020

Description

When I try to create a new DM by inviting an email address bound to an existing matrix account, the server returns an error {"errcode":"M_UNKNOWN","error":"Internal server error"}.

Note: the room creation is working when the invited email address is not bound to a matrix account.

Reproduced on riot-web version: bf174e3f0fc1-react-ae1d14d29fbb-js-1da959ab022c

@erikjohnston
Copy link
Member

erikjohnston commented Jun 9, 2020

I think the stack trace is:

KeyError: 'medium'
  File "synapse/http/server.py", line 78, in wrapped_request_handler
    await h(self, request)
  File "synapse/http/server.py", line 331, in _async_render
    callback_return = await callback_return
  File "synapse/rest/client/v2_alpha/account.py", line 758, in on_POST
    client_secret, sid, user_id, id_server, id_access_token
  File "synapse/handlers/identity.py", line 168, in bind_threepid
    medium=data["medium"],

i.e. that Synapse is expecting calls to /_matrix/identity/v2/3pid/bind to return a medium and address

Actually no, this looks like a separate issue.

@erikjohnston
Copy link
Member

erikjohnston commented Jun 9, 2020

The actual stack trace:

SignatureVerifyException: Unable to verify signature for vector.im: <class 'nacl.exceptions.BadSignatureError'> Signature was forged or corrupt
  File "synapse/http/server.py", line 78, in wrapped_request_handler
    await h(self, request)
  File "synapse/http/server.py", line 331, in _async_render
    callback_return = await callback_return
  File "synapse/rest/client/v1/room.py", line 97, in on_POST
    requester, self.get_room_config(request)
  File "synapse/handlers/room.py", line 749, in create_room
    id_access_token=id_access_token,
  File "synapse/handlers/room_member.py", line 788, in do_3pid_invite
    id_server, medium, address, id_access_token
  File "synapse/handlers/identity.py", line 592, in lookup_3pid
    return await self._lookup_3pid_v1(id_server, medium, address)
  File "synapse/handlers/identity.py", line 615, in _lookup_3pid_v1
    await self._verify_any_signature(data, id_server)
  File "synapse/handlers/identity.py", line 753, in _verify_any_signature
    key_name, decode_base64(key_data["public_key"])
  File "signedjson/sign.py", line 135, in verify_signed_json
    signature_name, type(e), e,

which is slightly worrying. (Sentry issue: https://sentry.matrix.org/sentry/synapse-matrixorg/issues/110333)

@erikjohnston erikjohnston added z-bug (Deprecated Label) p1 labels Jun 9, 2020
@richvdh
Copy link
Member

richvdh commented Jun 9, 2020

dup #5253

@richvdh richvdh closed this as completed Jun 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants