mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
add safeguard
This commit is contained in:
parent
ef5e68d0a9
commit
ac1e2d9ce0
@ -324,7 +324,10 @@ export function setupContentSecurityPolicy(customScheme: string): void {
|
|||||||
|
|
||||||
// IPC listener for updating allowed domains
|
// IPC listener for updating allowed domains
|
||||||
ipcMain.on('set-allowed-domains', (event, domains: string[]) => {
|
ipcMain.on('set-allowed-domains', (event, domains: string[]) => {
|
||||||
|
console.log('domains', domains)
|
||||||
|
if (!Array.isArray(domains)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Validate and transform user-provided domains
|
// Validate and transform user-provided domains
|
||||||
const validatedUserDomains = domains
|
const validatedUserDomains = domains
|
||||||
.flatMap((domain) => {
|
.flatMap((domain) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user