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

Fix allowed folders and CSP in oc10 app #4757

Merged
merged 1 commit into from
Feb 18, 2021
Merged
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: 5 additions & 0 deletions changelog/2.0.1_2021-02-18/fix-php-controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix oc10 deployment after switch to rollup

Our first release of the oc10 app after the switch to rollup as bundler had a bug as it didn't reflect the new folder structure of the app in the allowed folders. This has been fixed by updating the allowed folders.

https://github.com/owncloud/web/pull/4757
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.0.1",
"private": true,
"workspaces": [
"packages/web-app-draw-io",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-integration-oc10/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For feedback and bug reports, please use the [public issue tracker](https://gith
</description>
<licence>AGPL</licence>
<author>ownCloud</author>
<version>2.0.0</version>
<version>2.0.1</version>
<category>tools</category>
<website>https://github.com/owncloud/web</website>
<bugs>https://github.com/owncloud/web/issues</bugs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getFile(string $path): Response {
}

// check if path permitted
$permittedPaths = ["apps", "core", "css", "img", "node_modules", "themes", "index.html", "oidc-callback.html", "oidc-silent-redirect.html"];
$permittedPaths = ["css", "img", "js", "themes", "index.html", "oidc-callback.html", "oidc-silent-redirect.html"];
$found = false;
foreach ($permittedPaths as $p) {
if (\strpos($path, $p) === 0) {
Expand Down Expand Up @@ -104,7 +104,7 @@ public function getFile(string $path): Response {
'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
'X-Frame-Options' => 'DENY'
]);
if (\strpos($path, "oidc-callback.html") === 0 || \strpos($path, "oidc-silent-redirect.html") === 0) {
if (\strpos($path, "index.html") === 0 || \strpos($path, "oidc-callback.html") === 0 || \strpos($path, "oidc-silent-redirect.html") === 0) {
$csp = new ContentSecurityPolicy();
$csp->allowInlineScript(true);
$response->setContentSecurityPolicy($csp);
Expand Down