Skip to content

Commit ed5c1e9

Browse files
[mirotalk] - fix hyperlinks in the chat
1 parent 13b5bcf commit ed5c1e9

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

app/src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies: {
4545
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
4646
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
4747
* @author Miroslav Pejic - [email protected]
48-
* @version 1.5.08
48+
* @version 1.5.09
4949
*
5050
*/
5151

app/src/xss.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const log = new Logger('Xss');
1414
// Configure DOMPurify
1515
purify.setConfig({
1616
ALLOWED_TAGS: ['a', 'img', 'div', 'span', 'svg', 'g', 'p'], // Allow specific tags
17-
ALLOWED_ATTR: ['href', 'src', 'title', 'id', 'class', 'target'], // Allow specific attributes
17+
ALLOWED_ATTR: ['href', 'src', 'title', 'id', 'class', 'target', 'width', 'height'], // Allow specific attributes
1818
ALLOWED_URI_REGEXP: /^(?!data:|javascript:|vbscript:|file:|view-source:).*/, // Disallow dangerous URIs
1919
});
2020

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mirotalk",
3-
"version": "1.5.08",
3+
"version": "1.5.09",
44
"description": "A free WebRTC browser-based video call",
55
"main": "server.js",
66
"scripts": {
@@ -43,7 +43,7 @@
4343
"dependencies": {
4444
"@mattermost/client": "10.7.0",
4545
"@ngrok/ngrok": "1.5.1",
46-
"@sentry/node": "^9.17.0",
46+
"@sentry/node": "^9.19.0",
4747
"axios": "^1.9.0",
4848
"chokidar": "^4.0.3",
4949
"colors": "^1.4.0",

public/js/brand.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ let brand = {
7373
},
7474
about: {
7575
imageUrl: '../images/mirotalk-logo.gif',
76-
title: 'WebRTC P2P v1.5.08',
76+
title: 'WebRTC P2P v1.5.09',
7777
html: `
7878
<button
7979
id="support-button"

public/js/client.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @license For commercial use or closed source, contact us at [email protected] or purchase directly from CodeCanyon
1616
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
1717
* @author Miroslav Pejic - [email protected]
18-
* @version 1.5.08
18+
* @version 1.5.09
1919
*
2020
*/
2121

@@ -8457,12 +8457,14 @@ function isValidHttpURL(input) {
84578457
* @param {string} url to check
84588458
* @returns {boolean} true/false
84598459
*/
8460-
async function isImageURL(url) {
8460+
function isImageURL(input) {
8461+
if (!input || typeof input !== 'string') return false;
84618462
try {
8462-
const response = await fetch(url, { method: 'HEAD' });
8463-
const contentType = response.headers.get('content-type');
8464-
return contentType && contentType.startsWith('image/');
8465-
} catch {
8463+
const url = new URL(input);
8464+
return ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp', '.tiff', '.svg'].some((ext) =>
8465+
url.pathname.toLowerCase().endsWith(ext),
8466+
);
8467+
} catch (e) {
84668468
return false;
84678469
}
84688470
}
@@ -11158,7 +11160,7 @@ function showAbout() {
1115811160
Swal.fire({
1115911161
background: swBg,
1116011162
position: 'center',
11161-
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.5.08',
11163+
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.5.09',
1116211164
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
1116311165
customClass: { image: 'img-about' },
1116411166
html: `

0 commit comments

Comments
 (0)