Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow inline/eval script if debug mode is turned on #2414

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1
# Unreleased
## [25.x.x]
### Changed
- Use Nextcloud vue components for item list and article view
- Fix aspect ratio of article images
- Use Nextcloud vue components for item list and article view (#2401)
- Fix aspect ratio of article images (#2401)
- Allow usage of Vue devtools in Firefox (#2412)

### Fixed
- Adjust search urls to match changed Vue routes (#2408)
Expand Down
6 changes: 6 additions & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
->addAllowedFrameDomain('https://www.player.vimeo.com')
->addAllowedFrameDomain('https://vk.com')
->addAllowedFrameDomain('https://www.vk.com');

if ($this->settings->getSystemValue('debug')) {

Check failure on line 106 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.0

Only booleans are allowed in an if condition, mixed given.

Check failure on line 106 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.1

Only booleans are allowed in an if condition, mixed given.

Check failure on line 106 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.2

Only booleans are allowed in an if condition, mixed given.

Check failure on line 106 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Only booleans are allowed in an if condition, mixed given.
$csp->allowInlineScript(true);

Check failure on line 107 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.0

Call to deprecated method allowInlineScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: 10.0 CSP tokens are now used

Check failure on line 107 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.1

Call to deprecated method allowInlineScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: 10.0 CSP tokens are now used

Check failure on line 107 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.2

Call to deprecated method allowInlineScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: 10.0 CSP tokens are now used
$csp->allowEvalScript(true);

Check failure on line 108 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.0

Call to deprecated method allowEvalScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.

Check failure on line 108 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.1

Call to deprecated method allowEvalScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.

Check failure on line 108 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable27 with 8.2

Call to deprecated method allowEvalScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.

Check failure on line 108 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud pre-release with 8.2

Call to deprecated method allowEvalScript() of class OCP\AppFramework\Http\EmptyContentSecurityPolicy: Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.
}

$response->setContentSecurityPolicy($csp);

return $response;
Expand Down
Loading