[mirotalksfu] - #193 fix join room (oidc enabled)
هذا الالتزام موجود في:
@@ -633,9 +633,15 @@ function startServer() {
|
|||||||
} else {
|
} else {
|
||||||
const allowRoomAccess = isAllowedRoomAccess('/join/params', req, hostCfg, roomList, room);
|
const allowRoomAccess = isAllowedRoomAccess('/join/params', req, hostCfg, roomList, room);
|
||||||
const roomAllowedForUser = await isRoomAllowedForUser('Direct Join without token', name, room);
|
const roomAllowedForUser = await isRoomAllowedForUser('Direct Join without token', name, room);
|
||||||
|
|
||||||
|
log.debug('Direct Room Join no JWT --------------->', {
|
||||||
|
allowRoomAccess: allowRoomAccess,
|
||||||
|
roomAllowedForUser: roomAllowedForUser,
|
||||||
|
});
|
||||||
|
|
||||||
if (!allowRoomAccess && !roomAllowedForUser) {
|
if (!allowRoomAccess && !roomAllowedForUser) {
|
||||||
log.warn('Direct Room Join Unauthorized', room);
|
log.warn('Direct Room Join Unauthorized', room);
|
||||||
return res.redirect('/whoAreYou/' + room);
|
return OIDC.enabled ? res.redirect('/') : res.redirect('/whoAreYou/' + room);
|
||||||
//return res.status(401).json({ message: 'Direct Room Join Unauthorized' });
|
//return res.status(401).json({ message: 'Direct Room Join Unauthorized' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3360,6 +3366,8 @@ function startServer() {
|
|||||||
|
|
||||||
log.debug('isRoomAllowedForUser ------>', logData);
|
log.debug('isRoomAllowedForUser ------>', logData);
|
||||||
|
|
||||||
|
if (!username || !room) return false;
|
||||||
|
|
||||||
const isOIDCEnabled = config.oidc && config.oidc.enabled;
|
const isOIDCEnabled = config.oidc && config.oidc.enabled;
|
||||||
|
|
||||||
if (hostCfg.protected || hostCfg.user_auth) {
|
if (hostCfg.protected || hostCfg.user_auth) {
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم