[mirotalksfu] - fix, update dep
هذا الالتزام موجود في:
@@ -55,7 +55,7 @@ dev dependencies: {
|
||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.78
|
||||
* @version 1.5.79
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -431,7 +431,7 @@ function startServer() {
|
||||
hostCfg.authenticated = true;
|
||||
} else {
|
||||
hostCfg.authenticated = false;
|
||||
res.sendFile(views.login);
|
||||
res.redirect('/login');
|
||||
}
|
||||
} else {
|
||||
res.sendFile(views.landing);
|
||||
@@ -453,11 +453,11 @@ function startServer() {
|
||||
if ((!OIDC.enabled && hostCfg.protected && !hostCfg.authenticated) || authHost.isRoomActive()) {
|
||||
const ip = getIP(req);
|
||||
if (allowedIP(ip)) {
|
||||
res.sendFile(views.newRoom);
|
||||
res.redirect('/');
|
||||
hostCfg.authenticated = true;
|
||||
} else {
|
||||
hostCfg.authenticated = false;
|
||||
res.sendFile(views.login);
|
||||
res.redirect('/login');
|
||||
}
|
||||
} else {
|
||||
res.sendFile(views.newRoom);
|
||||
@@ -608,11 +608,11 @@ function startServer() {
|
||||
app.get(['/logged'], (req, res) => {
|
||||
const ip = getIP(req);
|
||||
if (allowedIP(ip)) {
|
||||
res.sendFile(views.landing);
|
||||
res.redirect('/');
|
||||
hostCfg.authenticated = true;
|
||||
} else {
|
||||
hostCfg.authenticated = false;
|
||||
res.sendFile(views.login);
|
||||
res.redirect('/login');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1221,6 +1221,7 @@ function startServer() {
|
||||
const validToken = await isValidToken(peer_token);
|
||||
|
||||
if (!validToken) {
|
||||
log.warn('[Join] - Invalid token', peer_token);
|
||||
return cb('unauthorized');
|
||||
}
|
||||
|
||||
@@ -1230,6 +1231,7 @@ function startServer() {
|
||||
|
||||
if (!isPeerValid) {
|
||||
// redirect peer to login page
|
||||
log.warn('[Join] - Invalid peer not authenticated', isPeerValid);
|
||||
return cb('unauthorized');
|
||||
}
|
||||
|
||||
@@ -1252,13 +1254,15 @@ function startServer() {
|
||||
});
|
||||
return cb('unauthorized');
|
||||
}
|
||||
} else {
|
||||
return cb('unauthorized');
|
||||
}
|
||||
// else {
|
||||
// return cb('unauthorized');
|
||||
// }
|
||||
|
||||
if (!hostCfg.users_from_db) {
|
||||
const roomAllowedForUser = isRoomAllowedForUser('[Join]', peer_name, room.id);
|
||||
if (!roomAllowedForUser) {
|
||||
log.warn('[Join] - Room not allowed for this peer', { peer_name, room_id: room.id });
|
||||
return cb('notAllowed');
|
||||
}
|
||||
}
|
||||
@@ -1345,6 +1349,7 @@ function startServer() {
|
||||
if ((hostCfg.protected || hostCfg.user_auth) && isPresenter && !hostCfg.users_from_db) {
|
||||
const roomAllowedForUser = isRoomAllowedForUser('[Join]', peer_name, room.id);
|
||||
if (!roomAllowedForUser) {
|
||||
log.warn('[Join] - Room not allowed for this peer', { peer_name, room_id: room.id });
|
||||
return cb('notAllowed');
|
||||
}
|
||||
}
|
||||
@@ -2813,11 +2818,19 @@ function startServer() {
|
||||
async function isAuthPeer(username, password) {
|
||||
if (hostCfg.users_from_db && hostCfg.users_api_endpoint) {
|
||||
try {
|
||||
const response = await axios.post(hostCfg.users_api_endpoint, {
|
||||
email: username,
|
||||
password: password,
|
||||
api_secret_key: hostCfg.users_api_secret_key,
|
||||
});
|
||||
// Using either email or username, as the username can also be an email here.
|
||||
const response = await axios.post(
|
||||
hostCfg.users_api_endpoint,
|
||||
{
|
||||
email: username,
|
||||
username: username,
|
||||
password: password,
|
||||
api_secret_key: hostCfg.users_api_secret_key,
|
||||
},
|
||||
{
|
||||
timeout: 5000, // Timeout set to 5 seconds (5000 milliseconds)
|
||||
},
|
||||
);
|
||||
return response.data && response.data.message === true;
|
||||
} catch (error) {
|
||||
log.error('AXIOS isAuthPeer error', error.message);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalksfu",
|
||||
"version": "1.5.78",
|
||||
"version": "1.5.79",
|
||||
"description": "WebRTC SFU browser-based video calls",
|
||||
"main": "Server.js",
|
||||
"scripts": {
|
||||
@@ -57,7 +57,7 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/node": "^8.32.0",
|
||||
"@sentry/node": "^8.33.1",
|
||||
"axios": "^1.7.7",
|
||||
"body-parser": "1.20.3",
|
||||
"colors": "1.4.0",
|
||||
@@ -77,7 +77,7 @@
|
||||
"mediasoup-client": "3.7.17",
|
||||
"ngrok": "^5.0.0-beta.2",
|
||||
"nodemailer": "^6.9.15",
|
||||
"openai": "^4.67.0",
|
||||
"openai": "^4.67.1",
|
||||
"qs": "6.13.0",
|
||||
"socket.io": "4.8.0",
|
||||
"swagger-ui-express": "5.0.1",
|
||||
|
||||
@@ -28,8 +28,7 @@ function login() {
|
||||
const password = filterXSS(document.getElementById('password').value);
|
||||
|
||||
// http://localhost:3010/join/?room=test
|
||||
// http://localhost:3010/join/?room=test&roomPassword=0&name=mirotalksfu&audio=0&video=0&screen=0¬ify=0
|
||||
// http://localhost:3010/join/?room=test&roomPassword=0&name=mirotalksfu&audio=0&video=0&screen=0¬ify=0&username=username&password=password
|
||||
// http://localhost:3010/join/?room=test&roomPassword=0&name=admin&audio=0&video=0&screen=0¬ify=0
|
||||
|
||||
const qs = new URLSearchParams(window.location.search);
|
||||
const room = filterXSS(qs.get('room'));
|
||||
@@ -55,7 +54,7 @@ function login() {
|
||||
return (window.location.href = '/join/' + window.location.search);
|
||||
// return (window.location.href = '/join/?room=' + room + '&token=' + token);
|
||||
}
|
||||
if (roomPath) {
|
||||
if (roomPath && roomPath !== 'login') {
|
||||
return (window.location.href = '/join/' + roomPath);
|
||||
// return (window.location.href ='/join/?room=' + roomPath + '&token=' + token);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
|
||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.78
|
||||
* @version 1.5.79
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -4490,7 +4490,7 @@ function showAbout() {
|
||||
imageUrl: image.about,
|
||||
customClass: { image: 'img-about' },
|
||||
position: 'center',
|
||||
title: 'WebRTC SFU v1.5.78',
|
||||
title: 'WebRTC SFU v1.5.79',
|
||||
html: `
|
||||
<br />
|
||||
<div id="about">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.78
|
||||
* @version 1.5.79
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم