Merge pull request #24387 from nextcloud/backport/24382/stable20

[stable20] Properly encode path when fetching inherited shares
This commit is contained in:
Christoph Wurst 2020-11-27 09:44:45 +01:00 committed by GitHub
commit f4d1f01209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -128,7 +128,7 @@ export default {
async fetchInheritedShares() { async fetchInheritedShares() {
this.loading = true this.loading = true
try { try {
const url = generateOcsUrl(`apps/files_sharing/api/v1/shares/inherited?format=json&path=${this.fullPath}`, 2) const url = generateOcsUrl(`apps/files_sharing/api/v1/shares/inherited?format=json&path=${encodeURIComponent(this.fullPath)}`, 2)
const shares = await axios.get(url.replace(/\/$/, '')) const shares = await axios.get(url.replace(/\/$/, ''))
this.shares = shares.data.ocs.data this.shares = shares.data.ocs.data
.map(share => new Share(share)) .map(share => new Share(share))