Skip to content
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
11 changes: 7 additions & 4 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,13 @@ public function updateShare(
$share->setPermissions($permissions);
}

if ($password === '') {
$share->setPassword(null);
} elseif ($password !== null) {
$share->setPassword($password);
$passwordParamSent = $password !== null;
if ($passwordParamSent) {
if ($password === '') {
$share->setPassword(null);
} else {
$share->setPassword($password);
}
}

if ($label !== null) {
Expand Down
4 changes: 3 additions & 1 deletion apps/files_sharing/src/mixins/SharesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ export default {
// share api controller accepts
for (const name of propertyNames) {
if (name === 'password') {
properties[name] = this.share.newPassword ?? this.share.password
if (this.share.newPassword !== undefined) {
properties[name] = this.share.newPassword
}
continue
}

Expand Down
12 changes: 10 additions & 2 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,11 @@ export default {

async saveShare() {
const permissionsAndAttributes = ['permissions', 'attributes', 'note', 'expireDate']
const publicShareAttributes = ['label', 'password', 'hideDownload']
const publicShareAttributes = ['label', 'hideDownload']
// Only include password if it's being actively changed
if (this.hasUnsavedPassword) {
publicShareAttributes.push('password')
}
if (this.config.allowCustomTokens) {
publicShareAttributes.push('token')
}
Expand Down Expand Up @@ -1221,7 +1225,11 @@ export default {
* "sendPasswordByTalk".
*/
onPasswordProtectedByTalkChange() {
this.queueUpdate('sendPasswordByTalk', 'password')
if (this.isEmailShareType || this.hasUnsavedPassword) {
this.queueUpdate('sendPasswordByTalk', 'password')
} else {
this.queueUpdate('sendPasswordByTalk')
}
},

isValidShareAttribute(value) {
Expand Down
2 changes: 2 additions & 0 deletions dist/1626-1626.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/1626-1626.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/1626-1626.js.map.license
2 changes: 0 additions & 2 deletions dist/8906-8906.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/8906-8906.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/8906-8906.js.map.license

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

Loading