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

[WiP] accept OCM to groups #1

Open
wants to merge 253 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
bd5f8b8
Echo some text to describe what happened in litmus tests
phil-davis Apr 17, 2023
2484585
Bump version in version.php
jnweiger Apr 3, 2023
d789383
prepare 10.12.1-rc.1
jnweiger Apr 3, 2023
8ea5ae8
Improve references in changelog folder. Now it is consistent with Rel…
jnweiger Apr 4, 2023
99d4057
Revert #40702 and #40712 for the 10.12.1 release, we want that in 10.…
jnweiger Apr 4, 2023
d538b8b
Version bump to 10.12.1 RC2
jnweiger Apr 4, 2023
abd6d47
fetch encryption app from marketplace (1.5.3). Instead of github mast…
jnweiger Apr 6, 2023
87c9d55
try withint encryption type
jnweiger Apr 6, 2023
b9ae5e8
Try harder to downgrade encryption in release-branch.
jnweiger Apr 6, 2023
9cb9862
...
jnweiger Apr 6, 2023
3509c53
Try checkout git tag v1.5.3 consistently in release-10.12.1 and fix_…
jnweiger Apr 6, 2023
3ea0df1
Fix 32bits quota release (#40729)
jvillafanez Apr 6, 2023
62e210d
bump rc.3 including improved 32-bit fixes.
jnweiger Apr 6, 2023
f99d4ef
Allow javascript .map files in .htaccess (#40735)
jnweiger Apr 14, 2023
7274b43
Bump version
jnweiger Apr 15, 2023
f4da73b
Prepare merge back of the release branch to master . (#40739)
jnweiger Apr 17, 2023
c8ed4da
Bump phpunit/phpunit from 9.6.6 to 9.6.7
dependabot[bot] Apr 17, 2023
955394f
Merge pull request #40741 from owncloud/merge-back-10.12.1
phil-davis Apr 18, 2023
69a420e
Automated changelog update [skip ci]
phil-davis Apr 18, 2023
4259414
restore services in teardown
saw-jan Apr 18, 2023
4283e9f
Merge pull request #40743 from owncloud/dependabot/composer/phpunit/p…
phil-davis Apr 18, 2023
086d494
Merge pull request #40662 from owncloud/update-litmus
phil-davis Apr 18, 2023
6725eab
Bump guzzlehttp/guzzle from 7.5.0 to 7.5.1
dependabot[bot] Apr 18, 2023
1bd1cdc
Bump roave/security-advisories to latest
phil-davis Apr 18, 2023
a6d457a
Adjust changelog for PHP dependencies not in 10.12.1
phil-davis Apr 18, 2023
236d7a8
changelog for guzzlehttp/guzzzle 7.5.1
phil-davis Apr 18, 2023
98924ef
Merge pull request #40742 from owncloud/dependabot/composer/guzzlehtt…
phil-davis Apr 18, 2023
33ab60f
Automated changelog update [skip ci]
phil-davis Apr 18, 2023
d83de13
Merge pull request #40744 from owncloud/unit-test/teardown-service
phil-davis Apr 18, 2023
2f55914
Accept OCM to groups
michielbdejong Apr 18, 2023
5eeb437
Accept OCM to groups
michielbdejong Apr 18, 2023
0485d0f
fix the broken tests
navid-shokri Apr 20, 2023
c2d3c6b
Fix code style
phil-davis Apr 21, 2023
783fe0c
Update ProviderFactory.php
navid-shokri Jun 26, 2023
049b9a8
Merge pull request #16 from pondersource/Fix#19-ocm
navid-shokri Jun 27, 2023
53b2921
improve logics
shokri-navid Jul 14, 2023
36b625d
adjust code format
shokri-navid Jul 14, 2023
263ceaa
remove extra space
shokri-navid Jul 14, 2023
2bea3c6
remove extra space
shokri-navid Jul 14, 2023
98d1200
Merge pull request #17 from pondersource/fix/review-comments
navid-shokri Jul 14, 2023
ab60172
add logger to RemoteOcsController
shokri-navid Jul 14, 2023
9f59310
resolve RemotOcsControllerTest error
shokri-navid Jul 14, 2023
7331f71
Resolve PR review conversations
shokri-navid Jul 14, 2023
d1d9d5e
Merge remote-tracking branch 'refs/remotes/origin/accept-ocm-to-group…
shokri-navid Jul 14, 2023
2d51f5d
check if shareType is undefined
soltanireza65 Jul 14, 2023
05f14c1
add comment to apps/files_sharing/api/v1 body `shareType`
soltanireza65 Jul 14, 2023
169637c
convert string share type to int
shokri-navid Jul 15, 2023
b9b618f
[tx] updated from transifex
ownclouders Apr 19, 2023
20b4b78
[tx] updated from transifex
ownclouders Apr 19, 2023
5b70118
Replace unit tests for the report command
jvillafanez Apr 19, 2023
8532abc
[tx] updated from transifex
ownclouders Apr 21, 2023
c2f4126
Limit fed-share token length (#40740)
IljaN Apr 21, 2023
cad31b2
[tx] updated from transifex
ownclouders Apr 22, 2023
001a9e9
Run some CI pipelines with Ubuntu 22
phil-davis Jun 7, 2022
bcf17f2
[tx] updated from transifex
ownclouders Apr 24, 2023
b43f312
[tx] updated from transifex
ownclouders Apr 24, 2023
902162f
Bump pear/pear-core-minimal from 1.10.11 to 1.10.13
dependabot[bot] Apr 24, 2023
a3e006b
Changelog for pear/pear-core-minimal 1.10.13
phil-davis Apr 25, 2023
e3d5ec5
Automated changelog update [skip ci]
phil-davis Apr 25, 2023
9cacac7
Handle X-Robots-Tag header valid values other than none
rizlas Mar 30, 2023
d4104e0
Add changelog. Precise messages in setupchecks securityHeaders
rizlas Mar 30, 2023
ee6bdce
Changelog
rizlas Mar 31, 2023
7044b38
Fix messages consistency with checkGeneric tests
rizlas Mar 31, 2023
de62b7b
Fix check header x-robots-tag exists
rizlas Mar 31, 2023
8103206
Update changelog/unreleased/40715
rizlas Apr 2, 2023
6508856
Update changelog/unreleased/40715
phil-davis Apr 2, 2023
e066f04
if statement styling. Increase browser compatibility. Increase securi…
rizlas Apr 15, 2023
fe759f5
fix line indentation
rizlas Apr 15, 2023
644b729
Automated changelog update [skip ci]
phil-davis Apr 26, 2023
651f312
[tx] updated from transifex
ownclouders Apr 26, 2023
22d787d
[tx] updated from transifex
ownclouders Apr 27, 2023
828d771
Cleanup acceptance tests
phil-davis Apr 25, 2023
765e29a
Use a shorter name in CI for mariaDB
phil-davis Apr 27, 2023
9b6d116
Add unit tests pipelines for mariaDB 10.9 10.10 10.11
phil-davis Apr 27, 2023
1d282d6
[tx] updated from transifex
ownclouders Apr 28, 2023
3111a56
[tx] updated from transifex
ownclouders May 1, 2023
79985f9
make a paramater accept null values
SwikritiT May 2, 2023
77ef389
Added default value for skipImportLdif as false
SagarGi May 2, 2023
4617ea7
Added default value for occlastCode default as null
SagarGi May 2, 2023
0c89c65
fix: use umask (#40765)
DeepDiver1975 May 3, 2023
95918f6
Add test scenarios for Last Login on Users page
phil-davis May 4, 2023
a380555
Hide lastLogin column on Users page when disabled
phil-davis May 4, 2023
44aec36
Automated changelog update [skip ci]
phil-davis May 4, 2023
4443193
[tx] updated from transifex
ownclouders May 5, 2023
0497297
[tx] updated from transifex
ownclouders May 8, 2023
7f5b345
Cleanup code in TestHelpers
phil-davis May 5, 2023
36c9b6b
skip new last-login UI scenarios on old oC10
phil-davis May 8, 2023
f940bdf
[tx] updated from transifex
ownclouders May 9, 2023
878569f
[tx] updated from transifex
ownclouders May 9, 2023
bd26aab
[tx] updated from transifex
ownclouders May 9, 2023
da52b22
Cleanup webUI test code
phil-davis May 9, 2023
4f772ce
[tx] updated from transifex
ownclouders May 9, 2023
46b29cb
Update vendor-bin dependencies
phil-davis May 10, 2023
80fa9b7
fix: data length validation on UsersController (#40769)
DeepDiver1975 May 10, 2023
9a4d042
Automated changelog update [skip ci]
DeepDiver1975 May 10, 2023
903c111
[tx] updated from transifex
ownclouders May 11, 2023
ee8cf36
Update to phpunit 9.6.8
phil-davis May 11, 2023
84441bf
[tx] updated from transifex
ownclouders May 12, 2023
5e77a8f
Align to new Google authorization URI (#40783)
May 12, 2023
6eff63b
Automated changelog update [skip ci]
May 12, 2023
2d351e0
.org with .com replaced
esgarov May 10, 2023
5d9130f
merge Elcin's and Martin's suggestions.
jnweiger May 12, 2023
2018fb4
[tx] updated from transifex
ownclouders May 13, 2023
704629b
Enhance share copy-overwrite test scenarios to demonstrate current be…
phil-davis Aug 22, 2022
7f8e49a
Demonstrate copy file over shared file and folder over shared folder
phil-davis Aug 22, 2022
98bf6be
Adjust tests for issue 40787 and 40788
phil-davis May 15, 2023
27046d5
Add scenario to demonstrate copying a folder onto another folder
phil-davis May 15, 2023
58bb786
[tx] updated from transifex
ownclouders May 16, 2023
f4d34e0
Bump guzzlehttp/guzzle from 7.5.1 to 7.6.1
dependabot[bot] May 15, 2023
1dd3bee
Changelog for guzzlehttp/guzzle 7.6.1
phil-davis May 16, 2023
9de3e11
Automated changelog update [skip ci]
phil-davis May 16, 2023
e956b88
add loginInOwnCloud to Log::
May 16, 2023
981e378
add changelog
May 16, 2023
91fee5a
fix style
May 16, 2023
198b338
Automated changelog update [skip ci]
phil-davis May 17, 2023
ce59145
Always return an int for Symfony Command execute method
phil-davis May 17, 2023
61f78aa
Changelog for Symfony Command execute method changes
phil-davis May 17, 2023
ee5648d
Automated changelog update [skip ci]
phil-davis May 17, 2023
38b5220
Fix 'does not exists' text
phil-davis May 17, 2023
109a55a
Exit with success when signing-key has been set
phil-davis May 17, 2023
3696088
Changelog for security:sign-key:create exit status fix
phil-davis May 17, 2023
6a04fec
Automated changelog update [skip ci]
phil-davis May 18, 2023
d911737
[tx] updated from transifex
ownclouders May 19, 2023
db93548
Adjust Symfony OutputFormatterInterface in unit tests
phil-davis May 18, 2023
dd5f6f0
Adjust PHP unit tests for Symfony 5
phil-davis May 19, 2023
c2d5742
Bump version to 10.13.0 prealpha
phil-davis May 19, 2023
1f58cf7
Do not try to revert LDAP settings of a deleted config
phil-davis May 19, 2023
a79e414
[tx] updated from transifex
ownclouders May 20, 2023
be1b8b8
[tx] updated from transifex
ownclouders May 21, 2023
69b1935
Update Symfony from major version 4 to 5
phil-davis Nov 29, 2022
3ca1dda
Automated changelog update [skip ci]
phil-davis May 21, 2023
1e417b9
[tx] updated from transifex
ownclouders May 22, 2023
0189761
Bump nikic/php-parser from 4.15.4 to 4.15.5
dependabot[bot] May 22, 2023
aa61a88
Bump guzzlehttp/guzzle from 7.6.1 to 7.7.0
dependabot[bot] May 22, 2023
c673e23
changelog for guzzle 7.7.0
phil-davis May 23, 2023
279de76
Automated changelog update [skip ci]
phil-davis May 23, 2023
479777d
[tx] updated from transifex
ownclouders May 23, 2023
0cbd5e0
fix: verify tag name length upon creation (#40804)
DeepDiver1975 May 23, 2023
1f10ddb
Automated changelog update [skip ci]
DeepDiver1975 May 23, 2023
d6eabdb
[tx] updated from transifex
ownclouders May 24, 2023
bc275f5
[tx] updated from transifex
ownclouders May 25, 2023
9eadeb0
[tx] updated from transifex
ownclouders May 25, 2023
1cf1d1e
[tx] updated from transifex
ownclouders May 26, 2023
14c1c6c
Use symfony/translation 5.4 in acceptance tests
phil-davis May 26, 2023
3e4550f
make sure to use json for federation post and get (#40815)
mrow4a May 26, 2023
80bee8e
Automated changelog update [skip ci]
mrow4a May 26, 2023
f7737c3
[tx] updated from transifex
ownclouders May 28, 2023
1c1ef03
Bump symfony/process from 5.4.23 to 5.4.24
dependabot[bot] May 29, 2023
bf47ef3
PHP dependencies and changelog
phil-davis May 30, 2023
856ff22
Automated changelog update [skip ci]
phil-davis May 30, 2023
8091a44
Add command to remove obsolete storages from the filecache
jvillafanez May 9, 2023
14b8d12
Provide option to show possible candidates
jvillafanez May 10, 2023
c00ab1c
Refine DB query
jvillafanez May 10, 2023
345c246
Adjust text
jvillafanez May 10, 2023
6165b3a
Fix issue with postgresql
jvillafanez May 15, 2023
a1b47b5
Fix problems with oracle and rename showed columns
jvillafanez May 16, 2023
d7558de
Add changelog entry
jvillafanez May 16, 2023
88d17e4
Automated changelog update [skip ci]
phil-davis May 31, 2023
851ce44
Update Google.php (cover variable initialisation for the else statement)
mmattel May 31, 2023
298b0b2
add changelog
mmattel May 31, 2023
46a939c
fix changelog title length
mmattel May 31, 2023
36ac07e
Automated changelog update [skip ci]
phil-davis May 31, 2023
05a1d82
Add commands to handle the trusted servers from command line (#40796)
jvillafanez Jun 5, 2023
0256d22
Automated changelog update [skip ci]
jvillafanez Jun 5, 2023
b44c5ad
Handle possible null original-location in tryToDeleteFileFromTrashbin
phil-davis Jun 5, 2023
d1e9a45
Bump PHP dependencies
phil-davis Jun 6, 2023
59d02ba
Automated changelog update [skip ci]
phil-davis Jun 6, 2023
cf61afb
Update ca-bundle.crt
IljaN Jun 6, 2023
2a3fe23
fix: Do not allow to set higher permissions on a federated share for …
DeepDiver1975 May 22, 2023
326de82
Automated changelog update [skip ci]
phil-davis Jun 7, 2023
47e90ad
bump version in sonar...
jnweiger Jun 6, 2023
836bb12
bump version in sonar-project to 10.13.0
phil-davis Jun 7, 2023
928e7fa
move changelog items for 10.12.2
phil-davis Jun 7, 2023
d0ee6b4
Automated changelog update [skip ci]
phil-davis Jun 7, 2023
78c1234
fix/optimize preview cleanup query
mtillberg May 20, 2023
adf6c9f
Automated changelog update [skip ci]
phil-davis Jun 8, 2023
be93dae
Add acceptance tests for occ previews:cleanup
phil-davis May 29, 2023
86cb6bd
Bump sabre/uri (2.3.2 => 2.3.3)
phil-davis Jun 12, 2023
c4ca05d
skip previews:cleanup acceptance test on older oC10
phil-davis Jun 12, 2023
c27cadf
Automated changelog update [skip ci]
phil-davis Jun 12, 2023
216f714
[tx] updated from transifex
ownclouders Jun 14, 2023
e0147c0
Enforce 2fa with exclusion groups
jvillafanez Jun 7, 2023
8969fd8
Adjust and add tests
jvillafanez Jun 8, 2023
128b04c
Add changelog entry
jvillafanez Jun 8, 2023
d65ff2a
Include comment and adjust panel priority
jvillafanez Jun 12, 2023
bcc7e5c
Typos in the template
jvillafanez Jun 12, 2023
0d578a8
Automated changelog update [skip ci]
phil-davis Jun 14, 2023
1dcb789
Bump phpseclib/phpseclib (3.0.19 => 3.0.20)
phil-davis Jun 14, 2023
2e30c66
Automated changelog update [skip ci]
phil-davis Jun 14, 2023
1ff7a7a
Ensure the requested open mode is set in the checksum wrapper
jvillafanez Jun 8, 2023
a4366dc
Adjust tests
jvillafanez Jun 8, 2023
fb25f76
Add changelog entry
jvillafanez Jun 8, 2023
5f97496
Automated changelog update [skip ci]
jvillafanez Jun 14, 2023
5edf1d3
[tx] updated from transifex
ownclouders Jun 15, 2023
6082995
Update php-jwt and some other files_external dependencies
phil-davis Jun 14, 2023
21086bd
Automated changelog update [skip ci]
phil-davis Jun 15, 2023
a84de39
Add scroll into view action (#40842)
amrita-shrestha Jun 16, 2023
f9d2e1c
refactor isNewPermissionHigher (#40829)
phil-davis Jun 16, 2023
6fbaba2
[tx] updated from transifex
ownclouders Jun 18, 2023
c25308b
[tx] updated from transifex
ownclouders Jun 19, 2023
1d5a9b6
Fix handling of logger calls in lib/private/Log.php
phil-davis Jun 20, 2023
7fde1c7
Add acceptance test for background:queue:execute
phil-davis Jun 20, 2023
9938378
Throw an exception if no logger method is available
phil-davis Jun 20, 2023
7680070
Automated changelog update [skip ci]
phil-davis Jun 20, 2023
3cc30a5
[tx] updated from transifex
ownclouders Jun 23, 2023
f493d7d
[tx] updated from transifex
ownclouders Jun 26, 2023
006ca5e
Fix error when version_metadata is enabled and there is no quota (#40…
IljaN Jun 26, 2023
d22af81
Automated changelog update [skip ci]
IljaN Jun 26, 2023
73b192b
Bump PHP dependencies
phil-davis Jun 26, 2023
511e116
Automated changelog update [skip ci]
phil-davis Jun 26, 2023
dcf7054
Apply code-style changes from php-cs-fixer 3.20
phil-davis Jun 28, 2023
f6c52a3
Bump sabre/xml (2.2.5 to 2.2.6)
phil-davis Jun 28, 2023
77e77b3
Automated changelog update [skip ci]
phil-davis Jun 29, 2023
4c440bd
Bump owncloud/tarstreamer (2.0.0 to 2.1.0)
phil-davis Jun 29, 2023
a74b15d
Automated changelog update [skip ci]
phil-davis Jun 29, 2023
285b6e2
[tx] updated from transifex
ownclouders Jun 30, 2023
d5eee37
[tx] updated from transifex
ownclouders Jul 2, 2023
38720d6
[tx] updated from transifex
ownclouders Jul 3, 2023
3e7b643
Remove cancelPreviousBuilds pipeline from drone
phil-davis Jul 4, 2023
f8e19ab
Remove early-fail stop-build step from acceptance test pipelines
phil-davis Jul 4, 2023
c35a752
[tx] updated from transifex
ownclouders Jul 5, 2023
72937a8
Adjust drone env variables for changes to drone CI
phil-davis Jul 6, 2023
4e8bf13
Fix references to CACHE_BUCKET
phil-davis Jul 6, 2023
e70cde4
[tx] updated from transifex
ownclouders Jul 7, 2023
c1bb789
Improve query performance
jvillafanez Jul 6, 2023
312cf9c
Add changelog entry
jvillafanez Jul 6, 2023
ffe21a5
Skip share_folder for guest users (#40864)
Jul 10, 2023
83cc3a2
Update config.apps.sample.php
mmattel Jul 10, 2023
77c16f7
Disable online updater for enterprise (#40841)
Jul 10, 2023
e3524ca
Bump semver from 6.3.0 to 6.3.1 in /build
dependabot[bot] Jul 11, 2023
6e5897b
Fix indent that php-style does not like now
phil-davis Jul 11, 2023
1690ba4
Bump phpunit/phpunit from 9.6.9 to 9.6.10
dependabot[bot] Jul 11, 2023
8ca7f05
Bump phpseclib/phpseclib from 3.0.20 to 3.0.21
dependabot[bot] Jul 11, 2023
8c4b420
changelog for phpseclib 3.0.21
phil-davis Jul 11, 2023
7a90310
Remove github comment from drone CI
phil-davis Jul 11, 2023
a5d74c0
Remove unused drone-github-comment image
phil-davis Jul 12, 2023
a6fb9c7
[tx] updated from transifex
ownclouders Jul 13, 2023
dd8f412
Automated changelog update [skip ci]
ownclouders Jul 13, 2023
049902e
fix: check for empty string if header exists
DeepDiver1975 Jul 3, 2023
6032582
fix: no CSRF required on GET requests
DeepDiver1975 Jul 10, 2023
0771327
fix: no CRSF on /privatedata/getattribute
DeepDiver1975 Jul 10, 2023
5abc25c
Automated changelog update [skip ci]
phil-davis Jul 14, 2023
26bc066
improve log messages for encryption rename (#40875)
Jul 14, 2023
caccb6c
Bump minimum.supported.desktop.version from 2.3.3 to 3.2.1 (#40876)
jnweiger Jul 15, 2023
c13a176
Fix code style
phil-davis Apr 21, 2023
1b7ebca
improve logics
shokri-navid Jul 14, 2023
5e85483
remove extra space
shokri-navid Jul 14, 2023
b839e2d
rebase to upstream master
shokri-navid Jul 16, 2023
8e804e3
code style fix
shokri-navid Jul 16, 2023
ea5afad
add missing logger parameter in RemoteOcsController
shokri-navid Jul 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
238 changes: 115 additions & 123 deletions .drone.star

Large diffs are not rendered by default.

288 changes: 266 additions & 22 deletions CHANGELOG.html

Large diffs are not rendered by default.

361 changes: 294 additions & 67 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ public function getCardUri($id) {
$result->closeCursor();

if (!isset($uri['uri'])) {
throw new \InvalidArgumentException('Card does not exists: ' . $id);
throw new \InvalidArgumentException('Card does not exist: ' . $id);
}

return $uri['uri'];
Expand Down Expand Up @@ -1062,7 +1062,7 @@ protected function getCardId($addressBookId, $uri) {
$result->closeCursor();

if (!isset($cardIds['id'])) {
throw new \InvalidArgumentException('Card does not exists: ' . $uri);
throw new \InvalidArgumentException('Card does not exist: ' . $uri);
}

return (int)$cardIds['id'];
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Command/CleanupChunks.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function configure() {
);
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$checkUploadExistsLocal = $input->getOption('local') === true;
$d = $input->getArgument('minimum-age-in-days');
$d = \max(2, \min($d, 100));
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Command/CreateAddressBook.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function configure() {
);
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getArgument('user');
if (!$this->userManager->userExists($user)) {
throw new \InvalidArgumentException("User <$user> in unknown.");
Expand Down
3 changes: 1 addition & 2 deletions apps/dav/lib/Command/CreateCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected function configure() {
);
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getArgument('user');
if (!$this->userManager->userExists($user)) {
throw new \InvalidArgumentException("User <$user> in unknown.");
Expand All @@ -82,7 +82,6 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$groupPrincipalBackend = new GroupPrincipalBackend(
$this->groupManager
);
$config = \OC::$server->getConfig();
$random = \OC::$server->getSecureRandom();

$name = $input->getArgument('name');
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Command/SyncBirthdayCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function configure() {
*
* @return int 0 if everything went fine, or an exit code
*/
protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getArgument('user');
if ($user !== null) {
if (!$this->userManager->userExists($user)) {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Command/SyncSystemAddressBook.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function configure() {
*
* @return int 0 if everything went fine, or an exit code
*/
protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln('Syncing users ...');
$progress = new ProgressBar($output);
$progress->start();
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function beforeHandler(RequestInterface $request) {
return;
}

$minimumSupportedDesktopVersion = $this->config->getSystemValue('minimum.supported.desktop.version', '2.3.3');
$minimumSupportedDesktopVersion = $this->config->getSystemValue('minimum.supported.desktop.version', '3.2.1');

// Match on the mirall version which is in scheme "Mozilla/5.0 (%1) mirall/%2" or
// "mirall/%1" for older releases
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function setETag($etag) {
* size because the actual size value isn't returned by google. This function
* will return null in this case)
*
* @return integer|null
* @return integer|float|null
*/
public function getSize() {
$size = $this->info->getSize();
Expand Down
35 changes: 15 additions & 20 deletions apps/dav/lib/Connector/Sabre/QuotaPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public function handleBeforeCreateFile($uri, $data, $parent, $modified) {
* This method is called before any HTTP method and validates there is enough free space to store the file
*
* @param string $path path of the user's home
* @param int $length size to check whether it fits
* @param int $extraSpace additional space granted, usually used when overwriting files
* @param int|float $length size to check whether it fits
* @param int|float $extraSpace additional space granted, usually used when overwriting files
* @throws InsufficientStorage
* @return bool
*/
Expand All @@ -204,25 +204,20 @@ public function checkQuota($path, $length = null, $extraSpace = 0) {
$path = \rtrim($parentPath, '/') . '/' . $info['name'];
}
$freeSpace = $this->getFreeSpace($path);
// workaround to guarantee compatibility on 32-bit systems as otherwise this would cause an int overflow on such systems
// when $freeSpace is above the max supported value. $freeSpace should be a float so we are using the <= 0.0 comparison
if (PHP_INT_SIZE === 4) {
$availableSpace = $freeSpace + $extraSpace;
if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && (($length > $availableSpace) || ($availableSpace <= 0.0))) {
if (isset($chunkHandler)) {
$chunkHandler->cleanup();
}
throw new InsufficientStorage();
}
} else {
// freeSpace might be false, or an int. Anyway, make sure that availableSpace will be an int.
$availableSpace = (int) $freeSpace + $extraSpace;
if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && (($length > $availableSpace) || ($availableSpace === 0))) {
if (isset($chunkHandler)) {
$chunkHandler->cleanup();
}
throw new InsufficientStorage();
if ($freeSpace === false) {
$freeSpace = 0;
}
// There could be cases where both $freeSpace and $extraSpace are floats:
// * $freeSpace could come from local storage, which calls disk_free_space, which returns float
// * $extraSpace could come from the DB. "size" column is bigint, which is returned as string. The storage
// cache uses `0 + $data['size']` where the $data['size'] should be a string, which should return an int if
// the result fits inside, but it could also be a float if it doesn't (more likely in 32 bits)
$availableSpace = $freeSpace + $extraSpace;
if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && (($length > $availableSpace) || ($availableSpace <= 0.0))) {
if (isset($chunkHandler)) {
$chunkHandler->cleanup();
}
throw new InsufficientStorage();
}
}
return true;
Expand Down
4 changes: 3 additions & 1 deletion apps/dav/lib/Connector/Sabre/SharesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ private function getSharesForNodeIds($nodeIDs) {
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK,
\OCP\Share::SHARE_TYPE_REMOTE
\OCP\Share::SHARE_TYPE_REMOTE,
\OCP\Share::SHARE_TYPE_REMOTE_GROUP

];

// Query DB for share types for specified node IDs
Expand Down
5 changes: 4 additions & 1 deletion apps/dav/lib/SystemTag/SystemTagPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function httpPost(RequestInterface $request, ResponseInterface $response)
* @throws Conflict if a tag with the same properties already exists
* @throws UnsupportedMediaType if the content type is not supported
*/
private function createTag($data, $contentType = 'application/json') {
private function createTag($data, $contentType = 'application/json'): ISystemTag {
if (\explode(';', $contentType)[0] === 'application/json') {
$data = \json_decode($data, true);
} else {
Expand All @@ -171,6 +171,9 @@ private function createTag($data, $contentType = 'application/json') {
if (!isset($data['name'])) {
throw new BadRequest('Missing "name" attribute');
}
if (\strlen($data['name']) > 64) {
throw new BadRequest('Tag name too long');
}

$tagName = $data['name'];
$userVisible = true;
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/Upload/ChunkingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ private function verifySize() {
return;
}
$actualSize = $this->sourceNode->getSize();
// $actualSize could be either an int or a float
if ($expectedSize != $actualSize) {
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize");
}
Expand Down
6 changes: 4 additions & 2 deletions apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public function testGetProperties($shareTypes) {
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK,
\OCP\Share::SHARE_TYPE_REMOTE
\OCP\Share::SHARE_TYPE_REMOTE,
\OCP\Share::SHARE_TYPE_REMOTE_GROUP
];

$this->shareManager->expects($this->any())
Expand Down Expand Up @@ -172,7 +173,8 @@ public function testPreloadThenGetProperties($shareTypes) {
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK,
\OCP\Share::SHARE_TYPE_REMOTE
\OCP\Share::SHARE_TYPE_REMOTE,
\OCP\Share::SHARE_TYPE_REMOTE_GROUP
];

$this->shareManager->expects($this->any())
Expand Down
54 changes: 53 additions & 1 deletion apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
use OCP\IUserSession;
use OCP\SystemTag\ISystemTag;
use OCP\SystemTag\TagAlreadyExistsException;
use Sabre\DAV\Exception\BadRequest;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
use OCA\DAV\SystemTag\SystemTagsByIdCollection;

class SystemTagPluginTest extends \Test\TestCase {
public const ID_PROPERTYNAME = \OCA\DAV\SystemTag\SystemTagPlugin::ID_PROPERTYNAME;
Expand Down Expand Up @@ -383,7 +387,7 @@ public function createTagInsufficientPermissionsProvider() {
* @dataProvider createTagInsufficientPermissionsProvider
*/
public function testCreateNotAssignableTagAsRegularUser($userVisible, $userAssignable, $userEditable, $groups) {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
$this->expectException(BadRequest::class);
$this->expectExceptionMessage('Not sufficient permissions');

$this->user->expects($this->once())
Expand Down Expand Up @@ -442,6 +446,54 @@ public function testCreateNotAssignableTagAsRegularUser($userVisible, $userAssig
$this->plugin->httpPost($request, $response);
}

public function testPostTooLongTagName(): void {
$this->expectException(BadRequest::class);
$this->expectExceptionMessage('Tag name too long');

$requestData = [
'name' => 'ThisTagNameIsByFarTooLong.ThisTagNameIsByFarTooLong.ThisTagNameIsByFarTooLong',
'userVisible' => true,
'userAssignable' => true,
'userEditable' => true
];
$requestData = \json_encode($requestData);

$node = $this->getMockBuilder(SystemTagsByIdCollection::class)
->disableOriginalConstructor()
->getMock();
$this->tagManager->expects($this->never())
->method('createTag');
$this->tagManager->expects($this->never())
->method('setTagGroups');

$this->tree
->method('getNodeForPath')
->with('/systemtags')
->willReturn($node);

$request = $this->getMockBuilder(RequestInterface::class)
->disableOriginalConstructor()
->getMock();
$response = $this->getMockBuilder(ResponseInterface::class)
->disableOriginalConstructor()
->getMock();

$request->expects($this->once())
->method('getPath')
->willReturn('/systemtags');

$request->expects($this->once())
->method('getBodyAsString')
->willReturn($requestData);

$request->expects($this->once())
->method('getHeader')
->with('Content-Type')
->willReturn('application/json');

$this->plugin->httpPost($request, $response);
}

public function testCreateTagInByIdCollectionAsRegularUser() {
$systemTag = new SystemTag(1, 'Test', true, false);

Expand Down
4 changes: 4 additions & 0 deletions apps/federatedfilesharing/l10n/en_GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ OC.L10N.register(
"federatedfilesharing",
{
"Federated sharing" : "Federated sharing",
"Add to" : "Add to",
"Loading..." : "Loading...",
"Change server..." : "Change server...",
"Invalid Federated Cloud ID" : "Invalid Federated Cloud ID",
"Sharing %s failed, because this item is already shared with %s" : "Sharing %s failed, because this item is already shared with %s",
"Not allowed to create a federated share with the same user" : "Not allowed to create a federated share with the same user",
Expand All @@ -19,8 +21,10 @@ OC.L10N.register(
"Share with me through my #ownCloud Federated Cloud ID" : "Share with me through my #ownCloud Federated Cloud ID",
"Federated Cloud Sharing" : "Federated Cloud Sharing",
"Open documentation" : "Open documentation",
"Periodically synchronize outdated federated shares for active users" : "Periodically synchronise outdated federated shares for active users",
"Allow users on this server to send shares to other servers" : "Allow users on this server to send shares to other servers",
"Allow users on this server to receive shares from other servers" : "Allow users on this server to receive shares from other servers",
"Automatically accept federated shares from trusted servers" : "Automatically accept federated shares from trusted servers",
"Federated Cloud" : "Federated Cloud",
"Your Federated Cloud ID:" : "Your Federated Cloud ID:",
"Share it:" : "Share it:",
Expand Down
4 changes: 4 additions & 0 deletions apps/federatedfilesharing/l10n/en_GB.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ "translations": {
"Federated sharing" : "Federated sharing",
"Add to" : "Add to",
"Loading..." : "Loading...",
"Change server..." : "Change server...",
"Invalid Federated Cloud ID" : "Invalid Federated Cloud ID",
"Sharing %s failed, because this item is already shared with %s" : "Sharing %s failed, because this item is already shared with %s",
"Not allowed to create a federated share with the same user" : "Not allowed to create a federated share with the same user",
Expand All @@ -17,8 +19,10 @@
"Share with me through my #ownCloud Federated Cloud ID" : "Share with me through my #ownCloud Federated Cloud ID",
"Federated Cloud Sharing" : "Federated Cloud Sharing",
"Open documentation" : "Open documentation",
"Periodically synchronize outdated federated shares for active users" : "Periodically synchronise outdated federated shares for active users",
"Allow users on this server to send shares to other servers" : "Allow users on this server to send shares to other servers",
"Allow users on this server to receive shares from other servers" : "Allow users on this server to receive shares from other servers",
"Automatically accept federated shares from trusted servers" : "Automatically accept federated shares from trusted servers",
"Federated Cloud" : "Federated Cloud",
"Your Federated Cloud ID:" : "Your Federated Cloud ID:",
"Share it:" : "Share it:",
Expand Down
18 changes: 4 additions & 14 deletions apps/federatedfilesharing/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,16 @@ function ($c) use ($server) {
$server->getUserManager(),
$c->query('AddressHandler'),
$c->query('FederatedShareManager'),
$server->getLogger()
$server->getLogger(),
$server->getConfig()
);
}
);

$container->registerService(
'NotificationManager',
function ($c) {
return new NotificationManager(
$c->query('Permissions')
);
}
);

$container->registerService(
'Permissions',
function ($c) {
return new Permissions();
return new NotificationManager();
}
);

Expand Down Expand Up @@ -208,9 +200,7 @@ protected function initFederatedShareProvider() {
\OC::$server->getMemCacheFactory(),
\OC::$server->getHTTPClientService()
);
$notificationManager = new NotificationManager(
new Permissions()
);
$notificationManager = new NotificationManager();
$notifications = new Notifications(
$addressHandler,
\OC::$server->getHTTPClientService(),
Expand Down
5 changes: 3 additions & 2 deletions apps/federatedfilesharing/lib/Command/PollIncomingShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ protected function configure() {
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int
*/
public function execute(InputInterface $input, OutputInterface $output) {
public function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln("WARNING: incoming-shares:poll has been deprecated and replaced by periodic external shares cronjob. Please check Federated Cloud Sharing settings and documentation.");
if ($this->externalMountProvider === null) {
$output->writeln("Polling is not possible when files_sharing app is disabled. Please enable it with 'occ app:enable files_sharing'");
Expand Down Expand Up @@ -134,6 +134,7 @@ public function execute(InputInterface $input, OutputInterface $output) {
}
}
$cursor->closeCursor();
return 0;
}

/**
Expand Down
Loading