Commit Graph

5783 Commits

Author SHA1 Message Date
Roeland Jago Douma 3d315ec64f
Fix vsprint parameter
%2\$; is not valid. On php7 this is just ignored but on php8 it gives an
error. %2\$s; works.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-03 08:25:11 +01:00
Morris Jobke c0a05c0412
Add notification for user limit
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Morris Jobke d87705a894
Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Morris Jobke 83a75c670b
Replace static call to Share::unshare with ShareManager->deleteShare in tests
And then cleanup all the code that is dead then...

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-30 09:51:18 +01:00
Roeland Jago Douma 2172432420
Merge pull request #23912 from nextcloud/objectstore-copy
use in objectstore copy
2020-11-25 16:09:26 +01:00
Robin Appelman 9d4848e863
use in objectstore copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-24 15:16:58 +01:00
Arthur Schiwon 16a78f535a
set the display name of federated sharees from addressbook
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-24 11:30:11 +01:00
Morris Jobke efe644137d
[encryption] Remove dependency fetching inside the constructor and move them to method call parameters
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-22 22:35:02 +01:00
Morris Jobke 1b613c84e9
Merge pull request #24007 from nextcloud/select-distinct-multiple
allow selecting multiple columns with SELECT DISTINCT
2020-11-19 22:39:01 +01:00
Roeland Jago Douma d602aa1825
Merge pull request #24135 from medical-cloud/fix/23357-nextcloud-logo-in-email-notifications-is-misaligned-in-version-20
Fix nextcloud logo in email notifications misalignment
2020-11-19 10:48:18 +01:00
medcloud 87ec4a0da3 Fix #23357
Signed-off-by: medcloud <42641918+medcloud@users.noreply.github.com>
2020-11-18 22:29:02 +01:00
Roeland Jago Douma 66013f906d
Merge pull request #24189 from nextcloud/enh/csp/frame-ancestors
Set frame-ancestors to none if none are filled
2020-11-18 11:29:28 +01:00
Roeland Jago Douma 9163790b7c
Set frame-ancestors to none if none are filled
frame-ancestors doesn't fall back to default-src. So when we apply a
very restricted CSP we should make sure to set it to 'none' and not
leave it empty.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-18 10:13:36 +01:00
Roeland Jago Douma 72a9c35be3
Remove some IRouter methods
This is not the end. IRouter needs to burn.
But it is a start.

🎵 we didn't start the fire 🎵

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-17 14:08:20 +01:00
Robin Appelman a61a757b85
allow selecting multiple columns with SELECT DISTINCT
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-16 15:45:17 +01:00
Daniel Calviño Sánchez 4d3cb1533e Add unit tests for "validateExpirationDateInternal"
They were copied and adjusted as needed from the tests for
"validateExpirationDate".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-16 08:54:19 +01:00
Daniel Calviño Sánchez baaaacd650 Add explicit time to test date for clarity
This shows in a clearer way that the expected expiration date is the
original one, but without time.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:34 +01:00
Daniel Calviño Sánchez 578b57837a Add unit test for expiration date with date and with default
This adds back what was being actually tested in the unit test fixed in
the previous commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:34 +01:00
Daniel Calviño Sánchez 70018ddabf Fix unit test for expiration date without date but with default
The expiration date was explicitly given, so it was not testing what it
should. Moreover, "link_defaultExpDays" needs to be mapped when testing
the default value (even if it will just fallback to the value of
"shareapi_expire_after_n_days").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:32 +01:00
Daniel Calviño Sánchez 3a53c2b6e5 Fix unit test method name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:31 +01:00
Daniel Calviño Sánchez e997f0fa46 Fix unit test for verifying enforced valid expiration date.
The enforced expiration date was not actually enabled, as for that
"shareapi_default_expire_date" needs to be explicitly set to "yes".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:31 +01:00
Daniel Calviño Sánchez 8f1fff40e8 Fix unit test for verifying enforced expire date too far in the future
The test should fail if no exception was thrown, and no exception was
thrown due to a missing configuration parameter. However, the use of
"addToAssertionCount(1)" made the test pass even if no exception was
thrown and, therefore, to silently fail.

Now the missing configuration parameter was added and the test will fail
if the expected exception is not thrown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:29 +01:00
Daniel Calviño Sánchez ec92e82571 Add unit tests to enforce a relaxed default share expiration date
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:28 +01:00
Daniel Calviño Sánchez 4dbeab5cff Remove wrong and misleading comment
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:26 +01:00
Daniel Calviño Sánchez 72f51422ec Remove extra spaces
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:25 +01:00
Daniel Calviño Sánchez 7cfa2701b9 Fix typo in variable name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:23 +01:00
Daniel Calviño Sánchez c8dc51f0ba Fix typos in method names
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-12 11:57:22 +01:00
Morris Jobke 42a033bbc4
Change to full class names for the encryption app DI in preparation of auto-wiring
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-11 21:30:45 +01:00
Joas Schilling e39d657e24
Merge pull request #23882 from nextcloud/tests/oracle
Run unit tests against oracle
2020-11-11 10:05:24 +01:00
Daniel Calviño Sánchez b6dec0be99 Add acceptance tests for reshares by link when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 01:35:27 +01:00
Daniel Calviño Sánchez 22d949d9d9 Add acceptance tests for reshares when resharing is disabled
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-11-11 01:35:27 +01:00
Joas Schilling 0c695d97ec
Fix unique key in test table
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 21:39:19 +01:00
Joas Schilling 61c767128c
Skip the insertIfNotExists() tests on Oracle because it doesn't work with clob
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:34:35 +01:00
Joas Schilling 74c0143001
Easier debugging and spell fix
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:34:35 +01:00
Joas Schilling e313777cd6
Use a different column for the primary key as we can not insert it on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:34:35 +01:00
Julius Härtl 2050517d44
Add github action for oci8
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-10 15:34:35 +01:00
Joas Schilling 8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Joas Schilling c07720de77
Use query builder instead of OC_DB in OC\Files\*
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 09:05:15 +01:00
John Molakvoæ d25e5366b8
Merge pull request #23934 from nextcloud/enh/avoid_scss_compile 2020-11-07 10:11:50 +01:00
Morris Jobke 3e6e9186d8
Fix tests to return config default values
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-07 10:11:20 +01:00
Morris Jobke 659ea6ad79
Merge pull request #23851 from nextcloud/enh/read_env_only_once
Read the env variables only once
2020-11-06 22:35:00 +01:00
Joas Schilling da1c2bdfe6
Fix repair mimetype step to not leave stray cursors
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-06 10:33:59 +01:00
Roeland Jago Douma f7a2b71627
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-06 09:37:45 +01:00
Joas Schilling ede7510854
Add a function to get the unread count for multiple objects in one go
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-04 11:01:21 +01:00
Morris Jobke 8d02ee9ac7
Merge pull request #21693 from nextcloud/fix/noid/import-certificates-only-by-system
Improve CertificateManager to not be user context dependent
2020-11-03 21:48:37 +01:00
Morris Jobke f03bb4716b
Remove OCSResponse type hint - see #23827
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-03 10:43:32 +01:00
Morris Jobke dc479aae2d
Improve CertificateManager to not be user context dependent
* removes the ability for users to import their own certificates (for external storage)
* reliably returns the same certificate bundles system wide (and not depending on the user context and available sessions)

The user specific certificates were broken in some cases anyways, as they are only loaded if the specific user is logged in and thus causing unexpected behavior for background jobs and other non-user triggered code paths.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-03 00:13:01 +01:00
Roeland Jago Douma fa6a790859
Remove deprecated OCSResponse
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-01 14:12:27 +01:00
Morris Jobke f94af85749
Merge pull request #23788 from nextcloud/techdebt/noid/only-run-phpunit-when-php-changed
Only run phpunit when "php" changed
2020-10-30 13:06:50 +01:00
Joas Schilling 8a3d9e52e3
Also run for .sh and .json (when not package or package-lock)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-30 10:30:50 +01:00