Skip to content

Commit 6531bcd

Browse files
ByteAfterliferejetto
authored andcommitted
fix: missing noopener for external links GHSA-xcxh-6cv4-q8p8
1 parent 482727c commit 6531bcd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

frontend/src/fileMenu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export async function openFileMenu(entry: DirEntry, ev: MouseEvent, addToMenu: (
4747
label: t('file_open', "Open"),
4848
href: uri,
4949
target: isFolder || entry.web ? undefined : '_blank',
50+
rel: isFolder || entry.web ? undefined : 'noopener noreferrer',
5051
onClick: makeOnClickOpen(entry)
5152
}
5253
return !isFolder || open.onClick ? open : h(LinkClosingDialog, { to: uri, reloadDocument: entry.web }, hIcon(open.icon), open.label)

0 commit comments

Comments
 (0)