From fe21c82a80eba1a665148e173944585e19d0f39c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 15 Jul 2018 17:27:26 -0400 Subject: [PATCH] prevent drag and drop of malicious scripts --- jslib | 2 +- src/app/main.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jslib b/jslib index 9bc7459eacb..76ece834d1d 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 9bc7459eacb55a234da8dd8aa71c059a4cd3e1ee +Subproject commit 76ece834d1d18e9cca71bb3c182d2284dae80958 diff --git a/src/app/main.ts b/src/app/main.ts index c6f0d55d0e3..510cda54e12 100644 --- a/src/app/main.ts +++ b/src/app/main.ts @@ -13,3 +13,7 @@ if (!isDev()) { } platformBrowserDynamic().bootstrapModule(AppModule); + +// Disable drag and drop to prevent malicious links from executing in the context of the app +document.addEventListener('dragover', (event) => event.preventDefault()); +document.addEventListener('drop', (event) => event.preventDefault());