Synapse: User can still use Riot.im after deleted from server

Created on 7 May 2019  Â·  5Comments  Â·  Source: matrix-org/synapse

Description

Steps to reproduce

  • Add user to Riot
  • Log in via Riot.im (android)
  • Chat with other users
  • Delete user from Riot
  • User still can answer messages via Riot.im after beeing deleted from server

Is there a way to force a deleted user to logout Riot.im?

Version information

  • Version: riot-v0.12.3
  • Platform: CentOS Linux release 7.6.1810 (Core)

Is there a way to force a deleted user to logout Riot.im?

All 5 comments

What steps did you take to delete the user? You probably did not wipe out their access tokens.

Hello,

I used a script:

./remove_user.sh user

!/bin/bash

cd /tmp

USER="$1"

SQLCMD="
DELETE FROM users WHERE name='@$USER:myserver.com';
DELETE FROM access_tokens WHERE user_id='@$USER:myserver.com';
DELETE FROM user_ips WHERE user_id='@$USER:myserver.com';
DELETE FROM profiles WHERE user_id='$USER';
DELETE FROM presence_stream WHERE user_id='@$USER:myserver.com';
DELETE FROM devices WHERE user_id='@$USER:myserver.com';
DELETE FROM device_lists_stream WHERE user_id='@$USER:myserver.com';
VACUUM;
"

echo $SQLCMD | sudo -u postgres psql synapse

By the way, how to wipe user access tokens?

DELETE FROM access_tokens WHERE user_id='@$USER:myserver.com'; in the SQLCMD you posted should already do this

After deleting them, did you restart synapse?

restarting synapse does the trick.

Thank you very much for help guys!!!
Much appreciated.

Best Regards,
Pedro Marques

Was this page helpful?
0 / 5 - 0 ratings