Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
56bdb43
Set version to 10.2.0 RC1
patrickjahns Apr 11, 2019
c8a5933
Fix missing progress bar in files drop view
Apr 16, 2019
b2c56a4
Filter unavailable users
VicDeo Apr 12, 2019
a8584cd
Remove unavailable shares
VicDeo Apr 16, 2019
05725ec
[stable10] Backport of Remove share permission check from the file up…
sharidas Apr 18, 2019
103a234
Respect 'writable' appdir flag on update
VicDeo Apr 22, 2019
f75c464
add new capability privateLinksDetailsParam
karakayasemi Apr 26, 2019
1bbc3e9
Avoid headers set twice in some situations
Apr 29, 2019
f0e25a4
Add the requiredPermissions property for extra share attributes
LinneyS Apr 9, 2019
9c87af1
Add js tests for share attributes
mrow4a Apr 13, 2019
6a4958e
Refactor share attribute js tests
mrow4a Apr 29, 2019
57e2e0d
When reshared disallow changing share attributes
mrow4a Apr 27, 2019
8e5d341
[stable10] Backport of Aborted uploads are not cleared properly
sharidas Apr 30, 2019
8ea76aa
[10.2.0] Backport of dont show notification if federated share autoac…
karakayasemi Apr 30, 2019
89fa785
Set mail_send via old share API
VicDeo May 2, 2019
f68f12f
Update changelog for 10.2.0 RC2
May 2, 2019
40fe2a6
Set version to 10.2.0RC2
patrickjahns May 2, 2019
7d0c168
[10.2.0] Backport of Fix update share permissions for public link
sharidas May 6, 2019
a06b142
[10.2.0] Backport of Fix permission and update behaviour for public link
sharidas May 9, 2019
1de4ca6
Set version to 10.2.0RC3
patrickjahns May 10, 2019
f5ef4ad
Treat send attempt unsuccessful when there is a message.
VicDeo May 14, 2019
e9ee492
[10.2.0] Backport of The public link edit template was outside public…
sharidas May 15, 2019
f29eb61
Update changelog for 10.2.0 RC4
patrickjahns May 16, 2019
f025bf4
set version to 10.2.0RC4
patrickjahns May 16, 2019
f436487
Update README.md file with 10.2 version
davitol May 16, 2019
27cf63d
Add webUI tests for share mail notification
paurakhsharma May 14, 2019
073cff9
Unskip behat step and remove issue tag
paurakhsharma May 16, 2019
7fe2d2c
set version to 10.2.0
patrickjahns May 16, 2019
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
2 changes: 2 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,7 @@ matrix:
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true
USE_EMAIL: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
Expand All @@ -1329,6 +1330,7 @@ matrix:
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true
USE_EMAIL: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
Expand Down
9 changes: 8 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,30 @@

<IfModule mod_env.c>
# Add security and privacy related headers
Header unset X-Content-Type-Options
Header always set X-Content-Type-Options "nosniff"
Header unset X-XSS-Protection
Header always set X-XSS-Protection "1; mode=block"
Header unset X-Robots-Tag
Header always set X-Robots-Tag "none"
Header unset X-Frame-Options
Header always set X-Frame-Options "SAMEORIGIN"
Header unset X-Download-Options
Header always set X-Download-Options "noopen"
Header unset X-Permitted-Cross-Domain-Policies
Header always set X-Permitted-Cross-Domain-Policies "none"
SetEnv modHeadersAvailable true
</IfModule>

# Let browsers cache CSS, JS files for half a year
<FilesMatch "\.(css|js)$">
Header unset Cache-Control
Header always set Cache-Control "max-age=15778463"
</FilesMatch>

# Let browsers cache WOFF files for a week
<FilesMatch "\.woff$">
Header unset Cache-Control
Header always set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
Expand Down Expand Up @@ -84,4 +92,3 @@ Options -Indexes
<IfModule pagespeed_module>
ModPagespeed Off
</IfModule>

33 changes: 16 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [10.2.0] - 2019-05-16

### Added

- Add new capability to advertise the availability of the detail parameter for private links - [#35104](https://github.com/owncloud/core/issues/35104)
- Add background:queue:execute occ command for running cron jobs manually - [#34995](https://github.com/owncloud/core/issues/34995)
- Adding background:queue commands: status and delete - [#34783](https://github.com/owncloud/core/issues/34783)
- Added new permissions option for public link - [#34983](https://github.com/owncloud/core/issues/34983)
- Adding background:queue commands: status and delete - [#34783](https://github.com/owncloud/core/issues/34783) [#35228](https://github.com/owncloud/core/pull/35228)
- Added new permissions option for public link - [#34983](https://github.com/owncloud/core/issues/34983) [#35082](https://github.com/owncloud/core/issues/35082)[#35159](https://github.com/owncloud/core/pull/35159)[#35197](https://github.com/owncloud/core/pull/35197)[#35238](https://github.com/owncloud/core/pull/35238)
- Support for extra share key-value attributes - [#34951](https://github.com/owncloud/core/issues/34951)
- Internal permission to prevent file download when set in share attribute, for "secure view" feature - [#34951](https://github.com/owncloud/core/issues/34951)
- Support for automatically accepting incoming federated shares from trusted servers - [#34206](https://github.com/owncloud/core/issues/34206)
- Internal permission to prevent file download when set in share attribute, for "secure view" feature - [#34951](https://github.com/owncloud/core/issues/34951) [#35095](https://github.com/owncloud/core/issues/35095)
- Support for automatically accepting incoming federated shares from trusted servers - [#34206](https://github.com/owncloud/core/issues/34206) [#35135](https://github.com/owncloud/core/issues/35135)
- User option for automatically accepting incoming shares - [#34647](https://github.com/owncloud/core/pull/34647) [#34842](https://github.com/owncloud/core/pull/34842) [#34934](https://github.com/owncloud/core/issues/34934)
- User option for automatically accepting incoming federated shares - [#34706](https://github.com/owncloud/core/issues/34706)
- User option to opt-out autocomplete in share dialog - [#34942](https://github.com/owncloud/core/issues/34942)
Expand All @@ -31,7 +32,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Allow admins to enable medial search on group and user - [#34779](https://github.com/owncloud/core/issues/34779)
- Add composer cleaner - [#34784](https://github.com/owncloud/core/issues/34784)
- Add events for user preference changes - [#34820](https://github.com/owncloud/core/issues/34820)
- Add occ command to poll incoming federated shares for updates - [#34933](https://github.com/owncloud/core/issues/34933) [#34959](https://github.com/owncloud/core/issues/34959) [#34993](https://github.com/owncloud/core/issues/34993)
- Add occ command to poll incoming federated shares for updates - [#34933](https://github.com/owncloud/core/issues/34933) [#34959](https://github.com/owncloud/core/issues/34959) [#34993](https://github.com/owncloud/core/issues/34993) [#35073](https://github.com/owncloud/core/issues/35073)

### Changed

Expand Down Expand Up @@ -59,14 +60,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Bump phpseclib/phpseclib from 2.0.13 to 2.0.15 - [#34285](https://github.com/owncloud/core/issues/34285) [#34741](https://github.com/owncloud/core/issues/34741)
- Bump pimple/pimple from 3.0.2 to 3.2.3 - [#31753](https://github.com/owncloud/core/issues/31753)
- Bump sinon from 7.1.1 to 7.3.1 in /build - [#34881](https://github.com/owncloud/core/issues/34881) [#34943](https://github.com/owncloud/core/issues/34943)
- Bump symfony v3.4.20 => v3.4.24 - [#34042](https://github.com/owncloud/core/issues/34042) [#34663](https://github.com/owncloud/core/issues/34663) [#34954](https://github.com/owncloud/core/issues/34954)
- Bump symfony/process from 3.4.21 to 3.4.22 - [#34407](https://github.com/owncloud/core/issues/34407)
- Bump symfony/translation from 3.4.21 to 3.4.22 - [#34406](https://github.com/owncloud/core/issues/34406)
- Bump symfony/console from 3.4.21 to 3.4.22 - [#34404](https://github.com/owncloud/core/issues/34404)
- Bump symfony and modules to 3.4.26 - [#35062](https://github.com/owncloud/core/issues/35062)
- Bump symfony/polyfill components from v1.10.0 to v1.11.0 - [#34882](https://github.com/owncloud/core/pull/34882)
- Bump symfony/routing from 3.4.21 to 3.4.22 - [#34408](https://github.com/owncloud/core/issues/34408)
- Bump symfony/event-dispatcher from 3.4.21 to 3.4.22 - [#34405](https://github.com/owncloud/core/issues/34405)
- Bump remaining symfony 3.4.22 components - [#34412](https://github.com/owncloud/core/issues/34412)
- Bump deepdiver1975/tarstreamer from 0.1.0 to 0.1.1 - [#34615](https://github.com/owncloud/core/issues/34615)
- Bump zendframework/zend-servicemanager from 3.3.2 to 3.4.0 - [#33971](https://github.com/owncloud/core/issues/33971)
- Bump zendframework/zend-inputfilter from 2.9.0 to 2.9.1 - [#34145](https://github.com/owncloud/core/issues/34145)
Expand All @@ -80,7 +75,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Add email footer with motto in email for changing password - [#34498](https://github.com/owncloud/core/issues/34498)
- Change the styling of the active settings navigation menu item - [#34561](https://github.com/owncloud/core/issues/34561)
- Added delay in search field - [#34613](https://github.com/owncloud/core/issues/34613)
- Tidy up code for notification by email - [#34786](https://github.com/owncloud/core/issues/34786)
- Tidy up code for notification by email - [#34786](https://github.com/owncloud/core/issues/34786) [#35137](https://github.com/owncloud/core/issues/35137)
- Some code now made PHP 7 specific - [#34925](https://github.com/owncloud/core/issues/34925)

### Removed
Expand All @@ -92,6 +87,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Fixed

- Wrong translation file referenced for accept & decline share - [#35063](https://github.com/owncloud/core/issues/35063)
- Respect 'writable' appdir flag on update - [#35097](https://github.com/owncloud/core/issues/35097)
- Aborted uploads in web UI are now properly cleared - [#35134](https://github.com/owncloud/core/issues/35134)
- Fix regression with missing progress bar in files drop view - [#35059](https://github.com/owncloud/core/issues/35059)
- Log exception when background job class not found - [#34723](https://github.com/owncloud/core/issues/34723)
- Prevent concurrent updates in group shares to avoid duplicate entries - [#34769](https://github.com/owncloud/core/issues/34769)
- Calender invitation now uses actual sender name - [#34901](https://github.com/owncloud/core/issues/34901)
Expand All @@ -101,7 +100,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Reduce sharing query size by properly reusing the query builder - [#34915](https://github.com/owncloud/core/issues/34915)
- Tar download support for file names longer than 99 chars - [#34615](https://github.com/owncloud/core/issues/34615)
- Fix Webdav error page, include CSP and message - [#34817](https://github.com/owncloud/core/issues/34817)
- Handle accept decline with invalid share id - [#34786](https://github.com/owncloud/core/issues/34786)
- Handle accept decline with invalid share id - [#34786](https://github.com/owncloud/core/issues/34786) [#35221](https://github.com/owncloud/core/pull/35221)
- Normalize path when moving chunks to final destination - [#34777](https://github.com/owncloud/core/issues/34777)
- Better support for international email addresses after swiftmailer update - [#34759](https://github.com/owncloud/core/issues/34759)
- Fix first time login handling - [#34758](https://github.com/owncloud/core/issues/34758)
Expand Down Expand Up @@ -135,7 +134,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fix reset confirmation mail from occ - [#34154](https://github.com/owncloud/core/issues/34154)
- Correctly write Login failed entry in log when 2FA is enforced - [#34055](https://github.com/owncloud/core/issues/34055)
- Center the logo and login fields - [#34057](https://github.com/owncloud/core/issues/34057)
- Fix Apache warnings by setting headers to "always" in htaccess - [#34089](https://github.com/owncloud/core/issues/34089)
- Fix Apache warnings by setting headers to "always" in htaccess - [#34089](https://github.com/owncloud/core/issues/34089) [#35118](https://github.com/owncloud/core/issues/35118)
- Fix external storage advanced checkbox state issue - [#34168](https://github.com/owncloud/core/issues/34168)
- Set permissions on log file creation instead of every write - [#34061](https://github.com/owncloud/core/issues/34061)
- Images are again properly rotated now based on EXIF rotation - [#34356](https://github.com/owncloud/core/issues/34356)
Expand Down Expand Up @@ -1023,7 +1022,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- provisioning API now also returns the user's home path: [#26850](https://github.com/owncloud/core/issues/26850)
- web updater shows link to changelog in admin page: [#26796](https://github.com/owncloud/core/issues/26796)

[Unreleased]: https://github.com/owncloud/core/compare/v10.1.1...stable10
[10.2.0]: https://github.com/owncloud/core/compare/v10.1.1...v10.2.0
[10.1.1]: https://github.com/owncloud/core/compare/v10.1.0...v10.1.1
[10.1.0]: https://github.com/owncloud/core/compare/v10.0.10...v10.1.0
[10.0.10]: https://github.com/owncloud/core/compare/v10.0.9...v10.0.10
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A personal cloud which runs on your own server.**
* ...

## Installation instructions
https://doc.owncloud.org/server/latest/admin_manual/installation/
https://doc.owncloud.org/server/10.2/admin_manual/installation/

## Contribution Guidelines
https://owncloud.org/contribute/
Expand All @@ -38,4 +38,4 @@ Please submit translations via Transifex:
https://www.transifex.com/projects/p/owncloud/

For detailed information about translations:
https://doc.owncloud.org/server/10.1/developer_manual/core/translation.html
https://doc.owncloud.org/server/10.2/developer_manual/core/translation.html
3 changes: 3 additions & 0 deletions apps/federatedfilesharing/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,18 @@ function ($c) {
function ($c) use ($server) {
if ($server->getAppManager()->isEnabledForUser('files_sharing')) {
$sharingApp = new \OCA\Files_Sharing\AppInfo\Application();
$externalManager = $sharingApp->getContainer()->query('ExternalManager');
$externalMountProvider = $sharingApp->getContainer()->query('ExternalMountProvider');
} else {
$externalManager = null;
$externalMountProvider = null;
}

return new PollIncomingShares(
$server->getDatabaseConnection(),
$server->getUserManager(),
\OC\Files\Filesystem::getLoader(),
$externalManager,
$externalMountProvider
);
}
Expand Down
41 changes: 35 additions & 6 deletions apps/federatedfilesharing/lib/Command/PollIncomingShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
namespace OCA\FederatedFileSharing\Command;

use OC\ServerNotAvailableException;
use OC\User\NoUserException;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\External\MountProvider;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Storage\IStorage;
use OCP\Files\Storage\IStorageFactory;
use OCP\Files\StorageInvalidException;
Expand All @@ -44,7 +48,11 @@ class PollIncomingShares extends Command {
/** @var IStorageFactory */
private $loader;

/** @var Manager */
private $externalManager;

/** @var MountProvider | null */

private $externalMountProvider;

/**
Expand All @@ -55,11 +63,12 @@ class PollIncomingShares extends Command {
* @param MountProvider $externalMountProvider
* @param IStorageFactory $loader
*/
public function __construct(IDBConnection $dbConnection, IUserManager $userManager, IStorageFactory $loader, MountProvider $externalMountProvider = null) {
public function __construct(IDBConnection $dbConnection, IUserManager $userManager, IStorageFactory $loader, Manager $externalManager = null, MountProvider $externalMountProvider = null) {
parent::__construct();
$this->dbConnection = $dbConnection;
$this->userManager = $userManager;
$this->loader = $loader;
$this->externalManager = $externalManager;
$this->externalMountProvider = $externalMountProvider;
}

Expand All @@ -82,16 +91,36 @@ public function execute(InputInterface $input, OutputInterface $output) {
$cursor = $this->getCursor();
while ($data = $cursor->fetch()) {
$user = $this->userManager->get($data['user']);
if ($user === null) {
$output->writeln(
"Skipping user \"{$data['user']}\". Reason: user manager was unable to resolve the uid into the user object"
);
continue;
}

$userMounts = $this->externalMountProvider->getMountsForUser($user, $this->loader);
/** @var \OCA\Files_Sharing\External\Mount $mount */
foreach ($userMounts as $mount) {
try {
/** @var Storage $storage */
$storage = $mount->getStorage();
$this->refreshStorageRoot($storage);
} catch (NoUserException $e) {
$shareData = $this->getExternalShareData($data['user'], $mount->getMountPoint());
$entryId = $shareData['id'];
$remote = $shareData['remote'];
// uid was null so we need to set it
$this->externalManager->setUid($data['user']);
$this->externalManager->removeShare($mount->getMountPoint());
// and now we need to reset uid back to null
$this->externalManager->setUid(null);
$output->writeln(
"Remote \"$remote\" reports that external share with id \"$entryId\" no longer exists. Removing it.."
);
} catch (\Exception $e) {
$entryId = $this->getExternalShareId($data['user'], $mount->getMountPoint());
$remote = $storage->getRemote();
$shareData = $this->getExternalShareData($data['user'], $mount->getMountPoint());
$entryId = $shareData['id'];
$remote = $shareData['remote'];
$reason = $e->getMessage();
$output->writeln(
"Skipping external share with id \"$entryId\" from remote \"$remote\". Reason: \"$reason\""
Expand Down Expand Up @@ -130,13 +159,13 @@ protected function getCursor() {
return $qb->execute();
}

protected function getExternalShareId(string $userId, string $mountPoint) {
protected function getExternalShareData(string $userId, string $mountPoint) {
$relativeMountPoint =\rtrim(
\substr($mountPoint, \strlen("/$userId/files")),
'/'
);
$qb = $this->dbConnection->getQueryBuilder();
$qb->selectDistinct('id')
$qb->select('*')
->from('share_external')
->where(
$qb->expr()->eq('user',
Expand All @@ -148,6 +177,6 @@ protected function getExternalShareId(string $userId, string $mountPoint) {
));
$result = $qb->execute();
$externalShare = $result->fetch();
return $externalShare['id'] ?? 0;
return $externalShare;
}
}
33 changes: 18 additions & 15 deletions apps/federatedfilesharing/lib/FedShareManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ public function createShare(Address $ownerAddress,
$token
) {
$owner = $ownerAddress->getUserId();
$remote = $ownerAddress->getOrigin();
$shareId = $this->federatedShareProvider->addShare(
$ownerAddress->getOrigin(), $token, $name, $owner, $shareWith, $remoteId
$remote, $token, $name, $owner, $shareWith, $remoteId
);

$this->eventDispatcher->dispatch(
Expand Down Expand Up @@ -163,20 +164,22 @@ public function createShare(Address $ownerAddress,
$sharedByAddress->getCloudId(),
\trim($name, '/')
];
$notification = $this->createNotification($shareWith);
$notification->setDateTime(new \DateTime())
->setObject('remote_share', $shareId)
->setSubject('remote_share', $params)
->setMessage('remote_share', $params);
$declineAction = $notification->createAction();
$declineAction->setLabel('decline')
->setLink($link, 'DELETE');
$notification->addAction($declineAction);
$acceptAction = $notification->createAction();
$acceptAction->setLabel('accept')
->setLink($link, 'POST');
$notification->addAction($acceptAction);
$this->notificationManager->notify($notification);
if (!$this->federatedShareProvider->getAccepted($remote, $shareWith)) {
$notification = $this->createNotification($shareWith);
$notification->setDateTime(new \DateTime())
->setObject('remote_share', $shareId)
->setSubject('remote_share', $params)
->setMessage('remote_share', $params);
$declineAction = $notification->createAction();
$declineAction->setLabel('decline')
->setLink($link, 'DELETE');
$notification->addAction($declineAction);
$acceptAction = $notification->createAction();
$acceptAction->setLabel('accept')
->setLink($link, 'POST');
$notification->addAction($acceptAction);
$this->notificationManager->notify($notification);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion apps/federatedfilesharing/lib/FederatedShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ public function addShare($remote, $token, $name, $owner, $shareWith, $remoteId)
*
* @return bool
*/
protected function getAccepted($remote, $shareWith) {
public function getAccepted($remote, $shareWith) {
$event = $this->eventDispatcher->dispatch(
'remoteshare.received',
new GenericEvent('', ['remote' => $remote])
Expand Down
Loading