Merge pull request #21005 from owncloud/verify_password_before_unshare

The ajax code path unshares a link share when updating the password
This commit is contained in:
Thomas Müller 2015-12-09 10:05:20 +01:00
commit bb8dbc291b
1 changed files with 5 additions and 0 deletions

View File

@ -762,6 +762,11 @@ class Share extends Constants {
$updateExistingShare = false;
if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes') == 'yes') {
// IF the password is changed via the old ajax endpoint verify it before deleting the old share
if ($passwordChanged === true) {
self::verifyPassword($shareWith);
}
// when updating a link share
// FIXME Don't delete link if we update it
if ($checkExists = self::getItems($itemType, $itemSource, self::SHARE_TYPE_LINK, null,