mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
fix: prevent malicious url in unsupported browser redirect
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
f1bfd7fd48
commit
d8392fc62f
3 changed files with 7 additions and 5 deletions
|
|
@ -141,8 +141,10 @@ export default {
|
|||
const urlParams = new URLSearchParams(window.location.search)
|
||||
if (urlParams.has('redirect_url')) {
|
||||
const redirectPath = Buffer.from(urlParams.get('redirect_url'), 'base64').toString() || '/'
|
||||
window.location = redirectPath
|
||||
return
|
||||
if (redirectPath.startsWith('/')) {
|
||||
window.location = generateUrl(redirectPath)
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location = generateUrl('/')
|
||||
},
|
||||
|
|
|
|||
4
dist/core-unsupported-browser.js
vendored
4
dist/core-unsupported-browser.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-unsupported-browser.js.map
vendored
2
dist/core-unsupported-browser.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue