mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix: migrate to getCSPNonce
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
355f18e6f1
commit
fb57ff4686
10 changed files with 20 additions and 18 deletions
|
|
@ -3,10 +3,11 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import { requestRoomSelection } from './utils/requestRoomSelection.js'
|
||||
|
||||
__webpack_nonce__ = btoa(OC.requestToken)
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
// eslint-disable-next-line
|
||||
__webpack_public_path__ = OC.linkTo('spreed', 'js/')
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import { generateFilePath, generateUrl } from '@nextcloud/router'
|
||||
|
|
@ -71,7 +71,7 @@ function init() {
|
|||
}
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
3
src/env.d.ts
vendored
3
src/env.d.ts
vendored
|
|
@ -2,6 +2,7 @@
|
|||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import type { getCSPNonce } from '@nextcloud/auth'
|
||||
|
||||
type ExitFullscreen = typeof document.exitFullscreen
|
||||
type RequestFullscreen = typeof document.documentElement.requestFullscreen
|
||||
|
|
@ -41,7 +42,7 @@ declare global {
|
|||
*/
|
||||
const IS_DESKTOP: false
|
||||
|
||||
let __webpack_nonce__: ReturnType<typeof btoa>
|
||||
let __webpack_nonce__: ReturnType<typeof getCSPNonce>
|
||||
let __webpack_public_path__: string
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { emit } from '@nextcloud/event-bus'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import Vue, { watch } from 'vue'
|
||||
|
|
@ -24,7 +24,7 @@ import 'leaflet-defaulticon-compatibility'
|
|||
|
||||
if (!IS_DESKTOP) {
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
|
@ -19,7 +19,7 @@ import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility
|
|||
import 'leaflet-defaulticon-compatibility'
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
|
@ -19,7 +19,7 @@ import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility
|
|||
import 'leaflet-defaulticon-compatibility'
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import { getSharingToken } from '@nextcloud/sharing/public'
|
||||
import Vue, { reactive } from 'vue'
|
||||
|
|
@ -20,7 +20,7 @@ import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility
|
|||
import 'leaflet-defaulticon-compatibility'
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
|
|
@ -26,7 +26,7 @@ import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility
|
|||
import 'leaflet-defaulticon-compatibility'
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import { generateFilePath, generateUrl } from '@nextcloud/router'
|
||||
|
|
@ -69,7 +69,7 @@ function init() {
|
|||
}
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { emit } from '@nextcloud/event-bus'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import { generateFilePath, imagePath } from '@nextcloud/router'
|
||||
|
|
@ -42,7 +42,7 @@ function init() {
|
|||
}
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
__webpack_nonce__ = getCSPNonce()
|
||||
|
||||
// Correct the root of the app for chunk loading
|
||||
// OC.linkTo matches the apps folders
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue