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

[full-ci] Do not cache files when opening them from public links #7075

Closed
wants to merge 3 commits into from
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
6 changes: 4 additions & 2 deletions changelog/5.5.0_2022-06-20/enhancement-update-sdk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Enhancement: Update SDK

We've updated the ownCloud SDK to version 3.0.0-alpha.10.
We've updated the ownCloud SDK to version 3.0.0-alpha.13.

- Change - Pass full trash bin path to methods of FilesTrash class: https://github.com/owncloud/owncloud-sdk/pull/1021
- Enhancement - Enforce share_type guest if applies: https://github.com/owncloud/owncloud-sdk/pull/1046
Expand All @@ -13,8 +13,10 @@ We've updated the ownCloud SDK to version 3.0.0-alpha.10.
- Enhancement - Add overwrite flag for file move: https://github.com/owncloud/owncloud-sdk/pull/1073
- Bugfix - Always add X-Request-ID: https://github.com/owncloud/owncloud-sdk/pull/1016
- Bugfix - Always add X-Requested-With header: https://github.com/owncloud/owncloud-sdk/pull/1020
- Bugfix - Do not load files from cache in public links: https://github.com/owncloud/owncloud-sdk/pull/1079

https://github.com/owncloud/web/pull/6820
https://github.com/owncloud/web/pull/6952
https://github.com/owncloud/web/pull/6994
https://github.com/owncloud/owncloud-sdk/releases/tag/v3.0.0-alpha.10
https://github.com/owncloud/web/pull/7075
https://github.com/owncloud/owncloud-sdk/releases/tag/v3.0.0-alpha.13
7 changes: 7 additions & 0 deletions changelog/unreleased/bugfix-nocache-pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Do not load files from cache in public links

When apps (i.e Drawio) try to load a file, the browser caches the request.
If the file was modified somewhere else, this causes inconsistent results which prevent saving any changes until the cache is properly cleared.
This had previously been fixed for normal files, but not yet for public links - which we took care of now.

https://github.com/owncloud/web/pull/7075
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export function useAppFileHandling({
// TODO: support query parameters, possibly needs porting away from owncloud-sdk
const getFileContents = async (filePath: string, options: Record<string, any>) => {
if (unref(isPublicLinkContext)) {
const res = await client.publicFiles.download('', filePath, unref(publicLinkPassword))
const res = await client.publicFiles.download('', filePath, unref(publicLinkPassword), {
noCache: true
})
res.statusCode = res.status

const responseType = ['arrayBuffer', 'blob', 'text'].includes(options?.responseType)
Expand Down
6 changes: 3 additions & 3 deletions packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@uppy/tus": "^3.0.1",
"@uppy/xhr-upload": "^3.0.1",
"@vue/composition-api": "^1.6.2",
"axios": "^0.27.1",
"axios": "^0.27.2",
"cross-fetch": "^3.0.6",
"easygettext": "https://github.com/owncloud/easygettext/archive/refs/tags/v2.18.1-oc.tar.gz",
"filesize": "^9.0.11",
Expand All @@ -31,7 +31,7 @@
"portal-vue": "^2.1.7",
"postcss-import": "^12.0.1",
"postcss-url": "^9.0.0",
"promise": "^8.0.3",
"promise": "^8.1.0",
"qs": "^6.10.3",
"sanitize-html": "^2.7.0",
"semver": "^7.3.7",
Expand All @@ -54,7 +54,7 @@
"vuex-extensions": "^1.1.5",
"vuex-router-sync": "^5.0.0",
"web-pkg": "*",
"webdav": "4.10.0",
"webdav": "^4.10.0",
"webfontloader": "^1.6.28",
"xml-js": "^1.6.11"
},
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3472,7 +3472,7 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:^0.27.1, axios@npm:^0.27.2":
"axios@npm:^0.27.2":
version: 0.27.2
resolution: "axios@npm:0.27.2"
dependencies:
Expand Down Expand Up @@ -10928,7 +10928,7 @@ __metadata:
languageName: node
linkType: hard

"promise@npm:^8.0.3":
"promise@npm:^8.1.0":
version: 8.1.0
resolution: "promise@npm:8.1.0"
dependencies:
Expand Down Expand Up @@ -13780,7 +13780,7 @@ __metadata:
"@uppy/tus": ^3.0.1
"@uppy/xhr-upload": ^3.0.1
"@vue/composition-api": ^1.6.2
axios: ^0.27.1
axios: ^0.27.2
cross-fetch: ^3.0.6
easygettext: "https://github.com/owncloud/easygettext/archive/refs/tags/v2.18.1-oc.tar.gz"
filesize: ^9.0.11
Expand All @@ -13798,7 +13798,7 @@ __metadata:
portal-vue: ^2.1.7
postcss-import: ^12.0.1
postcss-url: ^9.0.0
promise: ^8.0.3
promise: ^8.1.0
qs: ^6.10.3
sanitize-html: ^2.7.0
semver: ^7.3.7
Expand All @@ -13821,13 +13821,13 @@ __metadata:
vuex-extensions: ^1.1.5
vuex-router-sync: ^5.0.0
web-pkg: "*"
webdav: 4.10.0
webdav: ^4.10.0
webfontloader: ^1.6.28
xml-js: ^1.6.11
languageName: unknown
linkType: soft

"webdav@npm:4.10.0":
"webdav@npm:^4.10.0":
version: 4.10.0
resolution: "webdav@npm:4.10.0"
dependencies:
Expand Down