mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
chore(deps): Update @nextcloud/auth to v2.4.0 and use getCSPNonce where possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
|
||||
// eslint-disable-next-line n/no-missing-import, import/no-unresolved
|
||||
import MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { registerCommentsPlugins } from './comments-activity-tab.ts'
|
||||
|
||||
// @ts-expect-error __webpack_nonce__ is injected by webpack
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
if (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {
|
||||
// Do not mount own tab but mount into activity
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { t, n } from '@nextcloud/l10n'
|
||||
import { PiniaVuePlugin, createPinia } from 'pinia'
|
||||
import Vue from 'vue'
|
||||
import CommentsApp from '../views/Comments.vue'
|
||||
import logger from '../logger.js'
|
||||
|
||||
Vue.use(PiniaVuePlugin)
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Add translates functions
|
||||
Vue.mixin({
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import DashboardApp from './DashboardApp.vue'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
|
||||
import DashboardApp from './DashboardApp.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.directive('Tooltip', VTooltip)
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
||||
import AdminSettings from './components/AdminSettings.vue'
|
||||
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
import PersonalSettings from './components/PersonalSettings.vue'
|
||||
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
|
||||
import PersonalSettings from './components/PersonalSettings.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { PiniaVuePlugin } from 'pinia'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { getNavigation } from '@nextcloud/files'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { PiniaVuePlugin } from 'pinia'
|
||||
import Vue from 'vue'
|
||||
|
||||
import { pinia } from './store/index.ts'
|
||||
@@ -14,8 +14,7 @@ import SettingsModel from './models/Setting.js'
|
||||
import SettingsService from './services/Settings.js'
|
||||
import FilesApp from './FilesApp.vue'
|
||||
|
||||
// @ts-expect-error __webpack_nonce__ is injected by webpack
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { t, n } from '@nextcloud/l10n'
|
||||
|
||||
import ShareSearch from './services/ShareSearch.js'
|
||||
import ExternalLinkActions from './services/ExternalLinkActions.js'
|
||||
@@ -16,7 +16,7 @@ import TabSections from './services/TabSections.js'
|
||||
import ShareVariant from '@mdi/svg/svg/share-variant.svg?raw'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Init Sharing Tab Service
|
||||
if (!window.OCA.Sharing) {
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
|
||||
import PersonalSettings from './components/PersonalSettings.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
@@ -13,7 +13,7 @@ import logger from './logger.ts'
|
||||
import ProfileSettings from './components/BasicSettings/ProfileSettings.vue'
|
||||
import BackgroundJob from './components/BasicSettings/BackgroundJob.vue'
|
||||
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const profileEnabledGlobally = loadState('settings', 'profileEnabledGlobally', true)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import SettingsApp from './views/SettingsApp.vue'
|
||||
import router from './router/index.ts'
|
||||
import { useStore } from './store/index.js'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { PiniaVuePlugin, createPinia } from 'pinia'
|
||||
|
||||
Vue.use(VTooltip, { defaultHtml: false })
|
||||
@@ -21,7 +21,7 @@ sync(store, router)
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken() ?? '')
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// bind to window
|
||||
Vue.prototype.t = t
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
@@ -28,7 +28,7 @@ import ProfileVisibilitySection from './components/PersonalInfo/ProfileVisibilit
|
||||
import BirthdaySection from './components/PersonalInfo/BirthdaySection.vue'
|
||||
import FirstDayOfWeekSection from './components/PersonalInfo/FirstDayOfWeekSection.vue'
|
||||
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const profileEnabledGlobally = loadState('settings', 'profileEnabledGlobally', true)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { PiniaVuePlugin, createPinia } from 'pinia'
|
||||
import VTooltipPlugin from 'v-tooltip'
|
||||
import Vue from 'vue'
|
||||
@@ -13,7 +13,7 @@ import AuthTokenSection from './components/AuthTokenSection.vue'
|
||||
import '@nextcloud/password-confirmation/dist/style.css'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const pinia = createPinia()
|
||||
|
||||
|
||||
2
apps/settings/src/webpack.shim.d.ts
vendored
2
apps/settings/src/webpack.shim.d.ts
vendored
@@ -2,4 +2,4 @@
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
declare let __webpack_nonce__: string
|
||||
declare let __webpack_nonce__: string | undefined
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
import Vue from 'vue'
|
||||
import AdminSettings from './components/AdminSettings.vue'
|
||||
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
|
||||
import SystemTagsSection from './views/SystemTagsSection.vue'
|
||||
|
||||
// @ts-expect-error __webpack_nonce__ is injected by webpack
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const SystemTagsSectionView = Vue.extend(SystemTagsSection)
|
||||
new SystemTagsSectionView().$mount('#vue-admin-systemtags')
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
|
||||
import App from './AdminTheming.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.OC = OC
|
||||
Vue.prototype.t = t
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
|
||||
import { refreshStyles } from './helpers/refreshStyles.js'
|
||||
import App from './UserTheming.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.OC = OC
|
||||
Vue.prototype.t = t
|
||||
|
||||
@@ -3,16 +3,15 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { subscribe } from '@nextcloud/event-bus'
|
||||
import Vue from 'vue'
|
||||
|
||||
import UserStatus from './UserStatus.vue'
|
||||
|
||||
import store from './store/index.js'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.t = t
|
||||
Vue.prototype.$t = t
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import App from './App.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.prototype.t = t
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
import { getLoggerBuilder } from '@nextcloud/logger'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import Vue from 'vue'
|
||||
|
||||
import UnifiedSearch from './views/LegacyUnifiedSearch.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const logger = getLoggerBuilder()
|
||||
.setApp('unified-search')
|
||||
|
||||
@@ -14,12 +14,12 @@ import './globals.js'
|
||||
import './jquery/index.js'
|
||||
import { initCore } from './init.js'
|
||||
import { registerAppsSlideToggle } from './OC/apps.js'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import Axios from '@nextcloud/axios'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
initCore()
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
|
||||
import Profile from './views/Profile.vue'
|
||||
import ProfileSections from './profile/ProfileSections.js'
|
||||
|
||||
// @ts-expect-error Script nonce required for webpack loading additional scripts
|
||||
__webpack_nonce__ = btoa(getRequestToken() ?? '')
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
if (!window.OCA) {
|
||||
window.OCA = {}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import Vue from 'vue'
|
||||
|
||||
@@ -11,7 +11,7 @@ import logger from './logger.js'
|
||||
import RecommendedApps from './components/setup/RecommendedApps.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { getLoggerBuilder } from '@nextcloud/logger'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import { createPinia, PiniaVuePlugin } from 'pinia'
|
||||
import Vue from 'vue'
|
||||
@@ -13,7 +13,7 @@ import UnifiedSearch from './views/UnifiedSearch.vue'
|
||||
import { useSearchStore } from '../src/store/unified-search-external-filters.js'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
const logger = getLoggerBuilder()
|
||||
.setApp('unified-search')
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
|
||||
window.addEventListener('DOMContentLoaded', async function() {
|
||||
|
||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -12,7 +12,7 @@
|
||||
"@chenfengyuan/vue-qrcode": "^1.0.2",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/svg": "^7.4.47",
|
||||
"@nextcloud/auth": "^2.3.0",
|
||||
"@nextcloud/auth": "^2.4.0",
|
||||
"@nextcloud/axios": "^2.5.0",
|
||||
"@nextcloud/browser-storage": "^0.4.0",
|
||||
"@nextcloud/browserslist-config": "^3.0.1",
|
||||
@@ -4431,12 +4431,12 @@
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/@nextcloud/auth": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.3.0.tgz",
|
||||
"integrity": "sha512-PCkRJbML9sXvBENY43vTIERIZJFk2azu08IK6zYOnOZ7cFkD1QlFJtdTCZTImQLg01IXhIm0j0ExEdatHoqz7g==",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.4.0.tgz",
|
||||
"integrity": "sha512-T5OFltKd0O9Hfj47VrzE7TVjCwqOMHH9JLyjjLUR3pu2MaTY9WL6AjL79sHbFTXUaIkftZgJKu12lHYmqXnL2Q==",
|
||||
"dependencies": {
|
||||
"@nextcloud/event-bus": "^3.2.0"
|
||||
"@nextcloud/browser-storage": "^0.4.0",
|
||||
"@nextcloud/event-bus": "^3.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.0.0",
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"@chenfengyuan/vue-qrcode": "^1.0.2",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/svg": "^7.4.47",
|
||||
"@nextcloud/auth": "^2.3.0",
|
||||
"@nextcloud/auth": "^2.4.0",
|
||||
"@nextcloud/axios": "^2.5.0",
|
||||
"@nextcloud/browser-storage": "^0.4.0",
|
||||
"@nextcloud/browserslist-config": "^3.0.1",
|
||||
|
||||
Reference in New Issue
Block a user