diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-13 17:54:47 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-13 17:54:47 +0200 |
commit | ea021df9fa5e91006a4dabdb330f780c7e1e12cf (patch) | |
tree | 634a4c55db904dde477b46e0b5e5b5034631f538 /apps/comments | |
parent | 3e409fd34208afb69b270076e1f503c10101650a (diff) | |
download | nextcloud-server-ea021df9fa5e91006a4dabdb330f780c7e1e12cf.tar.gz nextcloud-server-ea021df9fa5e91006a4dabdb330f780c7e1e12cf.zip |
chore(deps): Update `@nextcloud/auth` to v2.4.0 and use `getCSPNonce` where possible
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/src/comments-tab.js | 4 | ||||
-rw-r--r-- | apps/comments/src/services/CommentsInstance.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/comments/src/comments-tab.js b/apps/comments/src/comments-tab.js index c9b3449e05e..d3ebe3e9596 100644 --- a/apps/comments/src/comments-tab.js +++ b/apps/comments/src/comments-tab.js @@ -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 diff --git a/apps/comments/src/services/CommentsInstance.js b/apps/comments/src/services/CommentsInstance.js index fccf55814ce..cc45d0cbea7 100644 --- a/apps/comments/src/services/CommentsInstance.js +++ b/apps/comments/src/services/CommentsInstance.js @@ -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({ |