[mirotalksfu] - fix inputValidator

هذا الالتزام موجود في:
Miroslav Pejic
2025-06-01 22:13:32 +02:00
الأصل dcad31ef64
التزام bdad3f24c1
9 ملفات معدلة مع 15 إضافات و12 حذوفات

عرض الملف

@@ -64,7 +64,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.8.55
* @version 1.8.56
*
*/

عرض الملف

@@ -1,6 +1,6 @@
{
"name": "mirotalksfu",
"version": "1.8.55",
"version": "1.8.56",
"description": "WebRTC SFU browser-based video calls",
"main": "Server.js",
"scripts": {

عرض الملف

@@ -64,7 +64,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: '<strong>WebRTC SFU v1.8.55</strong>',
title: '<strong>WebRTC SFU v1.8.56</strong>',
html: `
<button
id="support-button"

عرض الملف

@@ -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.8.55
* @version 1.8.56
*
*/
@@ -1151,7 +1151,7 @@ async function whoAreYou() {
title: BRAND.app?.name,
input: 'text',
inputPlaceholder: 'Enter your email or name',
inputAttributes: { maxlength: 32, id: 'usernameInput' },
inputAttributes: { maxlength: 254, id: 'usernameInput' },
inputValue: default_name,
html: initUser, // Inject HTML
confirmButtonText: `Join meeting`,
@@ -1163,7 +1163,10 @@ async function whoAreYou() {
},
inputValidator: (name) => {
if (!name) return 'Please enter your email or name';
if (name.length > 30) return 'Name must be max 30 char';
const isEmail = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(name);
if ((isEmail && name.length > 254) || (!isEmail && name.length > 32)) {
return isEmail ? 'Email must be max 254 char' : 'Name must be max 32 char';
}
name = filterXSS(name);
if (isHtml(name)) return 'Invalid name!';
if (!getCookie(room_id + '_name')) {
@@ -5450,7 +5453,7 @@ function showAbout() {
position: 'center',
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
customClass: { image: 'img-about' },
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.8.55',
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.8.56',
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.8.55
* @version 1.8.56
*
*/

عرض الملف

@@ -1540,7 +1540,7 @@ access to use this app.
type="text"
class="form-control"
placeholder="Search..."
maxlength="36"
maxlength="254"
/>
</div>

عرض الملف

@@ -126,7 +126,7 @@
<div class="mb-24">
<label for="roomName"></label>
<div class="form-group-desktop">
<input id="roomName" class="form-input" type="text" maxlength="36" value="" />
<input id="roomName" class="form-input" type="text" maxlength="254" value="" />
<button
id="genRoomButton"
class="button button-primary br-6 mr-8 mb-8 fas fa-arrows-rotate"

عرض الملف

@@ -100,7 +100,7 @@
class="form-input"
type="name"
placeholder="Username"
maxlength="36"
maxlength="254"
required
/>
</div>

عرض الملف

@@ -123,7 +123,7 @@
<div class="mb-24">
<label for="roomName"></label>
<div class="form-group-desktop">
<input id="roomName" class="form-input" type="text" maxlength="36" value="" />
<input id="roomName" class="form-input" type="text" maxlength="254" value="" />
<button
id="genRoomButton"
class="button button-primary br-6 mr-8 mb-8 fas fa-arrows-rotate"