fix: adjust webpack nonce generation

some leftovers where the request token is used instead of the CSP nonce.
in general this makes not much difference - but there are some cases
where those values differ.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/51524/head
Ferdinand Thiessen 7 months ago
parent 1e8870e3f8
commit 47734c26f3
  1. 3
      apps/files_sharing/src/additionalScripts.js
  2. 3
      apps/files_sharing/src/collaborationresourceshandler.js
  3. 4
      apps/settings/src/main-admin-ai.js
  4. 4
      apps/settings/src/main-admin-security.js
  5. 6
      apps/settings/src/main-personal-password.js
  6. 6
      apps/settings/src/main-personal-webauth.js

@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCSPNonce } from '@nextcloud/auth'
import './share.js'
import './sharebreadcrumbview.js'
@ -9,6 +10,6 @@ import './style/sharebreadcrumb.scss'
import './collaborationresourceshandler.js'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
window.OCA.Sharing = OCA.Sharing

@ -2,9 +2,10 @@
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCSPNonce } from '@nextcloud/auth'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
window.OCP.Collaboration.registerType('file', {
action: () => {

@ -2,13 +2,13 @@
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCSPNonce } from '@nextcloud/auth'
import Vue from 'vue'
import ArtificialIntelligence from './components/AdminAI.vue'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
Vue.prototype.t = t

@ -2,7 +2,7 @@
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCSPNonce } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import Vue from 'vue'
@ -11,7 +11,7 @@ import EncryptionSettings from './components/Encryption/EncryptionSettings.vue'
import store from './store/admin-security.js'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
Vue.prototype.t = t

@ -2,14 +2,14 @@
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCSPNonce } from '@nextcloud/auth'
import { t, n } from '@nextcloud/l10n'
import Vue from 'vue'
import PasswordSection from './components/PasswordSection.vue'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
Vue.prototype.t = t
Vue.prototype.n = n

@ -2,14 +2,14 @@
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import Vue from 'vue'
import { getCSPNonce } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import Vue from 'vue'
import WebAuthnSection from './components/WebAuthn/Section.vue'
// eslint-disable-next-line camelcase
__webpack_nonce__ = btoa(OC.requestToken)
__webpack_nonce__ = getCSPNonce()
Vue.prototype.t = t

Loading…
Cancel
Save