-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Device names are returned over federation by /keys/query
even if allow_device_name_lookup_over_federation
is false
#13114
Comments
Related #10015. However, this is attempting to fix a different leak. |
I can confirm this. Upon having a user invited to a room, Synapse looks to be returning device names to remote homeservers over federation in response to Request:
Response: {
"device_keys": {
"@person:localhost:8481": {
"HQHKSKPIQI": {
"algorithms": [
"m.olm.v1.curve25519-aes-sha2",
"m.megolm.v1.aes-sha2"
],
"device_id": "HQHKSKPIQI",
"keys": {
"curve25519:HQHKSKPIQI": "O3D1GbEKopw5dAcuc2E6xYMMRaQvwCkf2D+4xeXeCSo",
"ed25519:HQHKSKPIQI": "X53nYxuEQd1usY8387uJfUDtazIRwhjS6Pkzg3uEuyg"
},
"signatures": {
"@person:localhost:8481": {
"ed25519:HQHKSKPIQI": "7dCg4kjsi+oETLhFv/quZmPyHQgE4vwJxwwqetH4L0I2AU/Cf6c+2zd2I8Of8kZ2FNk+wrk1P2Thldl20xbLCA",
"ed25519:yIWhEMxxzCDEhfeqRn103sQJY9ehnDfhXFC3qyhr3nE": "ivXpqC7L2I0I+Xh6lMTdjvswLvVNB2aTedACDOEGT5XeB0Qip9hzX0UtRWwzRao5VHvegn+/tLdqLEZu0ga0Dg"
}
},
"user_id": "@person:localhost:8481",
"unsigned": {
"device_display_name": "develop.element.io (Firefox, Linux)" // Uh oh!
}
}
}
},
"failures": {},
"master_keys": {
"@person:localhost:8481": {
"user_id": "@person:localhost:8481",
"usage": [
"master"
],
"keys": {
"ed25519:RN7JygS0riSCBVD2uwiXei4UuRIV4ovtsRXtT8tK9W0": "RN7JygS0riSCBVD2uwiXei4UuRIV4ovtsRXtT8tK9W0"
},
"signatures": {
"@person:localhost:8481": {
"ed25519:HQHKSKPIQI": "zxz9UFUqbTpYIq0uiq9wrzmVlDYge1Xzqll9vSez/QJIMKxYEhoqQcOLH5Dkaalr/b3Kx2zb0+mZQCFwYPiNAg"
}
}
}
},
"self_signing_keys": {
"@person:localhost:8481": {
"user_id": "@person:localhost:8481",
"usage": [
"self_signing"
],
"keys": {
"ed25519:yIWhEMxxzCDEhfeqRn103sQJY9ehnDfhXFC3qyhr3nE": "yIWhEMxxzCDEhfeqRn103sQJY9ehnDfhXFC3qyhr3nE"
},
"signatures": {
"@person:localhost:8481": {
"ed25519:RN7JygS0riSCBVD2uwiXei4UuRIV4ovtsRXtT8tK9W0": "QcEq98iYp427e9zDmxixXfwgx7sYWq+HH7kgOlSVYVhWI6i2QxyOfPEkVO6m+kPdehGgiGva4BW2GhAje13/Ag"
}
}
}
},
"user_signing_keys": {}
} |
Looks like this is a result of synapse/synapse/handlers/e2e_keys.py Lines 443 to 460 in c52abc1
synapse/synapse/storage/databases/main/end_to_end_keys.py Lines 150 to 165 in 2cc5ea9
One solution would be to add a |
/keys/query
even if allow_device_name_lookup_over_federation
is false
Description
This will still show device names if someone invites you to a room and you have not joined yet.
Steps to reproduce
allow_device_name_lookup_over_federation:
set to falseHomeserver
matrix.org + another home server
Synapse Version
{"server_version":"1.61.0","python_version":"3.9.13"}
Installation Method
Docker (matrixdotorg/synapse)
Platform
docker pull matrixdotorg/synapse
Relevant log output
Anything else that would be useful to know?
n/a
The text was updated successfully, but these errors were encountered: