Skip to content

Commit 2562a9c

Browse files
committed
feat(security): warn for non-github, non-play.net urls
1 parent 90dde85 commit 2562a9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

electron/main/initialize-app.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ export const initializeApp = async (): Promise<void> => {
167167
// https://www.electronjs.org/docs/latest/tutorial/security
168168
app.on('web-contents-created', (_, contents) => {
169169
const allowedDomains = [
170-
/^(www\.)?github\.com$/i,
171-
/^(www\.)?play\.net$/i,
172-
/^elanthipedia\.play\.net$/i,
170+
// https://regex101.com/r/pUmfMR/1
171+
/^(.*\.)?github\.com$/i,
172+
/^(.*\.)?play\.net$/i,
173173
];
174174

175175
const isAllowedDomain = (domain: string): boolean => {

0 commit comments

Comments
 (0)