diff options
Diffstat (limited to 'core/src/views/UnsupportedBrowser.vue')
-rw-r--r-- | core/src/views/UnsupportedBrowser.vue | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/src/views/UnsupportedBrowser.vue b/core/src/views/UnsupportedBrowser.vue index 6754503f69f..c0331cb1f9b 100644 --- a/core/src/views/UnsupportedBrowser.vue +++ b/core/src/views/UnsupportedBrowser.vue @@ -112,12 +112,22 @@ export default { // Redirect if there is the data const urlParams = new URLSearchParams(window.location.search) if (urlParams.has('redirect_url')) { - const redirectPath = Buffer.from(urlParams.get('redirect_url'), 'base64').toString() || '/' + let redirectPath = Buffer.from(urlParams.get('redirect_url'), 'base64').toString() || '/' + + // remove index.php and double slashes + redirectPath = redirectPath + .replace('index.php', '') + .replace(getRootUrl(), '') + .replace(/\/\//g, '/') + + // if we have a valid redirect url, use it if (redirectPath.startsWith('/')) { window.location = generateUrl(redirectPath) return } } + + // else redirect to root window.location = generateUrl('/') }, |