fix(security): restrict audio URLs to HTTP(S)
Build Validation / build (push) Successful in 1m37s

This commit is contained in:
fraujulian committed 2026-09-28 13:36:44 +02:00
1 parent 04eba4de45
commit 00875123f5
1 file changed
+6 -1
+6 -1
View File
@@ -307,8 +307,13 @@ export default class AudioManager implements Disposable {
if (this.audioSource.type === 'url') { if (this.audioSource.type === 'url') {
try { try {
const url = new URL(this.audioSource.url);
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
throw new Error('Unsupported audio source protocol.');
}
return { return {
input: new URL(this.audioSource.url).toString(), input: url.toString(),
source: this.audioSource, source: this.audioSource,
}; };
} catch (error) { } catch (error) {