Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
83f7c286
Commit
83f7c286
authored
May 30, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: admin security UI
parent
1f9e5b3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
admin-security.vue
client/components/admin/admin-security.vue
+2
-1
security.js
server/middlewares/security.js
+1
-1
No files found.
client/components/admin/admin-security.vue
View file @
83f7c286
...
...
@@ -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'
...
...
server/middlewares/security.js
View file @
83f7c286
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment