From 83f7c2867d68d4e5d08b0345cf81ed6001e6c6a0 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 30 May 2020 16:42:48 -0400 Subject: [PATCH] fix: admin security UI --- client/components/admin/admin-security.vue | 3 ++- server/middlewares/security.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/components/admin/admin-security.vue b/client/components/admin/admin-security.vue index 909b258e..9bde7198 100644 --- a/client/components/admin/admin-security.vue +++ b/client/components/admin/admin-security.vue @@ -20,7 +20,7 @@ v-card-info(color='red') span Make sure to understand the implications before turning on / off a security feature. v-card-text - v-switch.mt-3( + v-switch( inset label='Block Open Redirect' color='red darken-2' @@ -29,6 +29,7 @@ hint='Prevents user controlled URLs from directing to websites outside of your wiki. This provides Open Redirect protection.' ) + v-divider.mt-3 v-switch.mt-3( inset label='Block IFrame Embedding' diff --git a/server/middlewares/security.js b/server/middlewares/security.js index f77079f1..7b5fb40a 100644 --- a/server/middlewares/security.js +++ b/server/middlewares/security.js @@ -39,7 +39,7 @@ module.exports = function (req, res, next) { // -> Prevent Open Redirect from user provided URL if (WIKI.config.security.securityOpenRedirect) { // Strips out all repeating / character in the provided URL - req.url = req.url.replace(/(\/)(?=\/*\1)/g, "") + req.url = req.url.replace(/(\/)(?=\/*\1)/g, '') } return next()