Skip to content

Commit

Permalink
Merge pull request #4757 from owncloud/fix-oc10-app
Browse files Browse the repository at this point in the history
Fix allowed folders and CSP in oc10 app
  • Loading branch information
kulmann authored Feb 18, 2021
2 parents 1262726 + 8d73a4b commit 04a07be
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
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

0 comments on commit 04a07be

Please sign in to comment.