From 6415d37ba50a79deecc1e02db317770a21f8e416 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Tue, 22 Jan 2019 12:03:54 -0800 Subject: [PATCH] Revert "Disable eval from webviews." This reverts commit f46631a6fba76b553ab72c750401ebd4c8bc0ece. This fixes #76 and #79. Apparently some sites, in this case FB Messenger and Outlook 365, blindly use `eval` and aren't responsive to fixes. If this causes security problems down the road, please don't blame me. :) --- resources/js/rambox-service-api.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/resources/js/rambox-service-api.js b/resources/js/rambox-service-api.js index 6d5289c7..7687dbfa 100644 --- a/resources/js/rambox-service-api.js +++ b/resources/js/rambox-service-api.js @@ -65,11 +65,3 @@ Notification.permission = NativeNotification.permission; Notification.requestPermission = NativeNotification.requestPermission.bind(Notification); window.close = function() { location.href = location.origin }; - -/** - * Disable eval for security reasons. - */ - // eslint-disable-next-line no-eval - window.eval = global.eval = function () { - throw new Error(`Sorry, this app does not support window.eval().`); - };