aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVarun Patil <varunpatil@ucla.edu>2023-05-19 23:23:30 -0700
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-05-24 10:38:43 +0000
commit60a7610ca6374bda9324c932c6b5c8bd731b3c14 (patch)
tree6788469a8a10583662c9b923af852b5eaa4a560a /core
parent4811a02740bf39d892be6dd730ca010e8b31ff94 (diff)
downloadnextcloud-server-60a7610ca6374bda9324c932c6b5c8bd731b3c14.tar.gz
nextcloud-server-60a7610ca6374bda9324c932c6b5c8bd731b3c14.zip
webpack: add nonce to unsupported-browser-redirect chunk
Signed-off-by: Varun Patil <varunpatil@ucla.edu> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r--core/src/unsupported-browser-redirect.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/unsupported-browser-redirect.js b/core/src/unsupported-browser-redirect.js
index 3ecf0b4dbe7..dd116b3a6ee 100644
--- a/core/src/unsupported-browser-redirect.js
+++ b/core/src/unsupported-browser-redirect.js
@@ -19,6 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+import { getRequestToken } from '@nextcloud/auth'
+
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(getRequestToken())
+
if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
window.addEventListener('DOMContentLoaded', async function() {
const { testSupportedBrowser } = await import('./utils/RedirectUnsupportedBrowsers.js')