Catching error when JWT token cannot be generated to avoid crashing Pusher

This commit is contained in:
David Négrier 2021-03-10 09:41:54 +01:00
parent 3eec41a1d0
commit a28fcbb9e6

View File

@ -509,6 +509,7 @@ export class SocketManager implements ZoneEventListener {
public handleQueryJitsiJwtMessage(client: ExSocketInterface, queryJitsiJwtMessage: QueryJitsiJwtMessage) {
try {
const room = queryJitsiJwtMessage.getJitsiroom();
const tag = queryJitsiJwtMessage.getTag(); // FIXME: this is not secure. We should load the JSON for the current room and check rights associated to room instead.
@ -543,6 +544,9 @@ export class SocketManager implements ZoneEventListener {
serverToClientMessage.setSendjitsijwtmessage(sendJitsiJwtMessage);
client.send(serverToClientMessage.serializeBinary().buffer, true);
} catch (e) {
console.error('An error occured while generating the Jitsi JWT token: ', e);
}
}
public emitSendUserMessage(userUuid: string, message: string, type: string): void {