Merge pull request #45770 from nextcloud/backport/45765/stable28

[stable28] fix(settings): Use axios directly for health check to preven URL sanitizing
This commit is contained in:
Daniel 2024-07-03 18:30:33 +02:00 committed by GitHub
commit f9ec46d35b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -24,6 +24,7 @@
import api from './api.js'
import Vue from 'vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError, showInfo } from '@nextcloud/dialogs'
@ -186,13 +187,13 @@ const actions = {
})
// check for server health
return api.get(generateUrl('apps/files/'))
return axios.get(generateUrl('apps/files/'))
.then(() => {
if (response.data.update_required) {
showInfo(
t(
'settings',
'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'
'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.',
),
{
onClick: () => window.location.reload(),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long