File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515use OCP \AppFramework \Http \Attribute \NoAdminRequired ;
1616use OCP \AppFramework \Http \Attribute \NoCSRFRequired ;
1717use OCP \AppFramework \Http \Attribute \OpenAPI ;
18- use OCP \AppFramework \Http \ContentSecurityPolicy ;
1918use OCP \AppFramework \Http \FeaturePolicy ;
2019use OCP \AppFramework \Http \TemplateResponse ;
2120use OCP \AppFramework \Services \IInitialState ;
@@ -80,10 +79,6 @@ public function index(): TemplateResponse {
8079 'pageTitle ' => $ this ->l10n ->t ('Dashboard ' ),
8180 ]);
8281
83- $ csp = new ContentSecurityPolicy ();
84- $ csp ->addAllowedScriptDomain ("'unsafe-eval' " );
85- $ response ->setContentSecurityPolicy ($ csp );
86-
8782 // For the weather widget we should allow the geolocation
8883 $ featurePolicy = new FeaturePolicy ();
8984 $ featurePolicy ->addAllowedGeoLocationDomain ('\'self \'' );
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ import { getCurrentUser } from '@nextcloud/auth'
133133import axios from ' @nextcloud/axios'
134134import { loadState } from ' @nextcloud/initial-state'
135135import { generateOcsUrl , generateUrl } from ' @nextcloud/router'
136- import Draggable from ' vuedraggable'
136+ // import this directly so Vite builds it and we don't end up using the UMD bundle which
137+ // tries to run "new Function(...)" (for no good reason) which is blocked by our CSP
138+ import Draggable from ' vuedraggable/src/vuedraggable.js'
137139import NcButton from ' @nextcloud/vue/components/NcButton'
138140import NcModal from ' @nextcloud/vue/components/NcModal'
139141import NcUserStatusIcon from ' @nextcloud/vue/components/NcUserStatusIcon'
You can’t perform that action at this time.
0 commit comments