Skip to content

Commit 79d6b98

Browse files
authored
Merge pull request #52003 from nextcloud/backport/51524/stable31
[stable31] fix: adjust webpack nonce generation
2 parents 3cd879f + affff45 commit 79d6b98

22 files changed

+73
-33
lines changed

apps/files_sharing/src/additionalScripts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5+
import { getCSPNonce } from '@nextcloud/auth'
56

67
import './share.js'
78
import './sharebreadcrumbview.js'
89
import './style/sharebreadcrumb.scss'
910
import './collaborationresourceshandler.js'
1011

1112
// eslint-disable-next-line camelcase
12-
__webpack_nonce__ = btoa(OC.requestToken)
13+
__webpack_nonce__ = getCSPNonce()
1314

1415
window.OCA.Sharing = OCA.Sharing

apps/files_sharing/src/collaborationresourceshandler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5+
import { getCSPNonce } from '@nextcloud/auth'
56

67
// eslint-disable-next-line camelcase
7-
__webpack_nonce__ = btoa(OC.requestToken)
8+
__webpack_nonce__ = getCSPNonce()
89

910
window.OCP.Collaboration.registerType('file', {
1011
action: () => {

apps/settings/src/main-admin-ai.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
5+
import { getCSPNonce } from '@nextcloud/auth'
66
import Vue from 'vue'
77

88
import ArtificialIntelligence from './components/AdminAI.vue'
99

1010
// eslint-disable-next-line camelcase
11-
__webpack_nonce__ = btoa(OC.requestToken)
11+
__webpack_nonce__ = getCSPNonce()
1212

1313
Vue.prototype.t = t
1414

apps/settings/src/main-admin-security.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
5+
import { getCSPNonce } from '@nextcloud/auth'
66
import { loadState } from '@nextcloud/initial-state'
77
import Vue from 'vue'
88

@@ -11,7 +11,7 @@ import EncryptionSettings from './components/Encryption/EncryptionSettings.vue'
1111
import store from './store/admin-security.js'
1212

1313
// eslint-disable-next-line camelcase
14-
__webpack_nonce__ = btoa(OC.requestToken)
14+
__webpack_nonce__ = getCSPNonce()
1515

1616
Vue.prototype.t = t
1717

apps/settings/src/main-personal-password.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5+
import { getCSPNonce } from '@nextcloud/auth'
6+
import { t, n } from '@nextcloud/l10n'
57

68
import Vue from 'vue'
7-
89
import PasswordSection from './components/PasswordSection.vue'
9-
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
1010

1111
// eslint-disable-next-line camelcase
12-
__webpack_nonce__ = btoa(OC.requestToken)
12+
__webpack_nonce__ = getCSPNonce()
1313

1414
Vue.prototype.t = t
1515
Vue.prototype.n = n

apps/settings/src/main-personal-webauth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
6-
import Vue from 'vue'
5+
import { getCSPNonce } from '@nextcloud/auth'
76
import { loadState } from '@nextcloud/initial-state'
7+
import Vue from 'vue'
88

99
import WebAuthnSection from './components/WebAuthn/Section.vue'
1010

1111
// eslint-disable-next-line camelcase
12-
__webpack_nonce__ = btoa(OC.requestToken)
12+
__webpack_nonce__ = getCSPNonce()
1313

1414
Vue.prototype.t = t
1515

dist/core-common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-additionalScripts.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-additionalScripts.js.license

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
SPDX-License-Identifier: MIT
2+
SPDX-License-Identifier: ISC
23
SPDX-License-Identifier: GPL-3.0-or-later
34
SPDX-License-Identifier: AGPL-3.0-or-later
45
SPDX-FileCopyrightText: escape-html developers
56
SPDX-FileCopyrightText: Tobias Koppers @sokra
7+
SPDX-FileCopyrightText: Roman Shtylman <[email protected]>
68
SPDX-FileCopyrightText: Roeland Jago Douma
79
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
10+
SPDX-FileCopyrightText: GitHub Inc.
811
SPDX-FileCopyrightText: Christoph Wurst
912

1013

1114
This file is generated from multiple sources. Included packages:
15+
- @nextcloud/auth
16+
- version: 2.4.0
17+
- license: GPL-3.0-or-later
18+
- @nextcloud/browser-storage
19+
- version: 0.4.0
20+
- license: GPL-3.0-or-later
1221
- @nextcloud/capabilities
1322
- version: 1.2.0
1423
- license: GPL-3.0-or-later
24+
- semver
25+
- version: 7.6.3
26+
- license: ISC
27+
- @nextcloud/event-bus
28+
- version: 3.3.2
29+
- license: GPL-3.0-or-later
1530
- @nextcloud/initial-state
1631
- version: 2.2.0
1732
- license: GPL-3.0-or-later
@@ -24,6 +39,9 @@ This file is generated from multiple sources. Included packages:
2439
- escape-html
2540
- version: 1.0.3
2641
- license: MIT
42+
- process
43+
- version: 0.11.10
44+
- license: MIT
2745
- style-loader
2846
- version: 4.0.0
2947
- license: MIT

0 commit comments

Comments
 (0)