Commit Graph

4041 Commits

Author SHA1 Message Date
Morris Jobke 248d95339d
Cleanup some unused sharing methods from the old sharing code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-02 10:49:42 +01:00
Daniel Calviño Sánchez fe8a67f517 Store "sendPasswordByTalk" property of link shares in the database
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 01:57:48 +01:00
Daniel Calviño Sánchez 00e4c8aee4 Fix update share tests
The update share tests only checked that the share returned by
"update()" had the expected values. However, as "update()" returns the
same share that was given as a parameter the tests were not really
verifying that the values were updated in the database.

In a similar way, the test that checked that a password was removed did
not set a password first, so even if the database returned null it could
be simply returning the default value for the share; a password must be
set first to ensure that it is removed.

Besides that, a typo was fixed too that made the checks on the original
share instead of on the one returned by "update()"; right now it is the
same share, so the change makes no difference, but it is how the check
should be done anyway.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 01:09:01 +01:00
John Molakvoæ (skjnldsv) 98f30c2dab
Merge branch 'addressbook-uid-check-migration' of https://github.com/nextcloud/server into addressbook-uid-check-migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 17:33:58 +01:00
John Molakvoæ (skjnldsv) abed75e5cb
Fix phpunit
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 17:32:21 +01:00
Morris Jobke f5a1f4bc1b
Revert "Wait for cron to finish before running upgrade command"
This reverts commit 18e9631810.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 15:23:40 +01:00
John Molakvoæ (skjnldsv) 06b3ade9ee
Tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 15:00:49 +01:00
Robin Appelman 9b3cc72f7c
fix writeStream for jail wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-31 21:10:57 +01:00
Robin Appelman 93de63777e
extend storage api to allow directly writing a stream to storage
this removes the need for temporary storages with some external storage backends.
The new method is added to a separate interface to maintain compatibility with
storage backends implementing the storage interface directly (without inheriting common)

Currently the interface is implemented for objectstorage based storages and local storage
and used by webdav uploads

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-31 21:10:44 +01:00
Roeland Jago Douma ce10f8b8c4
Only generate previews in powers of 4 and set min
Before we'd round up all preview request to their nearest power of two.
This resulted still in a lot of possible images. Generating a lot of
server load and taking up a lot of space.

This moves it to previews to be powers of 4: 64, 256, 1024 and 4096
Also the first two powers are always skipped (4, 16) as it doesn't make
sense to generate previews for that.

We cache preview pretty agressively and I feel this is a better
tradeoff.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-31 19:34:42 +01:00
Roeland Jago Douma 674930da7f
Move ExpiredTokenException to the correct namespace
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-30 19:30:45 +01:00
Roeland Jago Douma 41ff001b77
Merge pull request #11899 from nextcloud/enhancement/noid/sharing-consolidation
Sharing user consolidation
2018-10-30 19:27:05 +01:00
John Molakvoæ (skjnldsv) e2ec641c7b
Tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 13:05:10 +01:00
Julius Härtl 5a73a9b9de
Fix injection to get the user id
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 11:41:56 +01:00
Morris Jobke dccfe4bf84
Merge pull request #12036 from olivermg/master
Add capability of specifying "trusted_proxies" entries in CIDR notation (IPv4)
2018-10-30 10:49:08 +01:00
Julius Härtl a0d759b324
Add uuid/name entry to Remote/MailPlugin tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:36 +01:00
Julius Härtl 61af607525
Make enhancing entries with type property optional
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:35 +01:00
Julius Härtl ce79e587e4
Filter out local users from address book remote searches
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-30 10:19:33 +01:00
Oliver Wegner 401ca28f07 Adding handling of CIDR notation to trusted_proxies for IPv4
Signed-off-by: Oliver Wegner <void1976@gmail.com>
2018-10-30 09:15:42 +01:00
Julius Härtl 34a71f57fc
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-29 13:06:55 +01:00
Julius Härtl d21ded67a7
Keep list of icons in a separate file for use in the accessibility app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-25 12:16:10 +02:00
Bjoern Schiessle d76a87f3b0
skip already decrypted files on decrypt all command
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-24 16:53:39 +02:00
Morris Jobke 39338aaa67
Merge pull request #11914 from nextcloud/csp/report-uri
Add report-uri to CSP
2018-10-23 16:42:24 +02:00
John Molakvoæ (skjnldsv) 782927a05f
fixup! Fix comment and cap-height
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-23 14:30:23 +02:00
John Molakvoæ (skjnldsv) 1fb885638e
Fix comment and cap-height
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-23 14:22:55 +02:00
Jan-Christoph Borchardt 354b72b9d3
Use correct typeface for avatar generator
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-10-23 13:13:35 +02:00
Roeland Jago Douma 579822b6a5
Add report-uri to CSP
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-21 13:38:32 +02:00
Christoph Wurst a1ea504edf
Merge pull request #11711 from nextcloud/feature/backgroundjobs_ocp
Add proper backgroundjobs to OCP
2018-10-19 07:40:35 +02:00
Arthur Schiwon 8e4ae23c48
Do not try to contact lookup server without internet connection or URL
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-10-18 17:49:28 +02:00
Morris Jobke ad66b0f9ab
Merge pull request #11830 from nextcloud/bugfix/9326/make_sure_usermanager_getByEmail_only_returns_IUser
filter null values for UserManager::getByEmail
2018-10-16 09:14:25 +02:00
Julius Härtl b9a87a69cf
Use IAccountManager constants
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-15 13:30:31 +02:00
Julius Härtl 9381e681a9
Add tests for new account api classes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-15 13:30:31 +02:00
Georg Ehrke 2db26d87c4
filter null values for UserManager::getByEmail
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-10-15 13:27:58 +02:00
Björn Schießle 1ce8672276
Merge pull request #11714 from nextcloud/lookupserver-and-global-scale
always query the lookup server in a global scale setup
2018-10-15 12:14:04 +02:00
Christoph Wurst 83e994c11f
Make it possible to enforce mandatory 2FA for groups
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-15 08:22:52 +02:00
Roeland Jago Douma 5b61ef9213
Disallow unsafe-eval by default
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-14 20:45:34 +02:00
Bjoern Schiessle 1b0b159685
add more tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-12 16:11:48 +02:00
Bjoern Schiessle fd5fc24da2
some small fixes and improvements
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-10 16:07:01 +02:00
Roeland Jago Douma d5bf2c4523
Move normalizePath to regexes instead of looping
This is IMO a bit more readable and it seems to make the code faster.
Tested it on the company instance where there are over 3k calls to this
function. It shaves off around 10ms.

The advantage here is that the pattern gets optimized by php itsel and
cached.
Also looking for all patterns at the same time and especially no longer
looping for /./ patterns should save time.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-10 13:23:59 +02:00
Bjoern Schiessle 9e76d4049a
adjust tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-09 18:31:33 +02:00
Roeland Jago Douma c97b4274cc
Add function to generate urls for OCS routes
fixes #11617

The OCS routes are only absolute for now as they are often exposed to
the outside anyway and are on a different endpoint than index.php in
anyway.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-09 15:41:50 +02:00
Roeland Jago Douma 8493f49211
fixup! fixup! Add backgroundjobs to OCP
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-09 15:25:56 +02:00
Christoph Wurst 3f2cd13beb
Remove HHVM check
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-09 10:12:15 +02:00
Morris Jobke db345e4c6d
Deprecate unused, private OC_Helper::linkToPublic
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-10-08 18:29:52 +02:00
Morris Jobke fe2a600823
Merge pull request #10839 from nextcloud/bugfix/10212/use_class_implementation
adjust Calendar resource / room interfaces to use class implementation
2018-10-08 17:00:50 +02:00
Morris Jobke bae3ba3b25
Merge pull request #11671 from nextcloud/refactor/rename-admin-security-section
Rename admin security section
2018-10-08 13:57:38 +02:00
Christoph Wurst b1b43aa7bc
Fix reference to template in tests
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-08 11:27:22 +02:00
Morris Jobke 7971ba5cc6
Merge pull request #10898 from nextcloud/feature/10684/default-logo-color-theme-colors
Switches the default logo color depending on the primary color
2018-10-08 10:33:22 +02:00
Christoph Wurst 5d2fdfe0b5
Rename admin security section
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-08 10:31:51 +02:00
Georg Ehrke 970242b6ca
RoomManager/ResourceManager: Inject IServerContainer instead of using OC Server
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-10-08 01:50:17 +02:00
Georg Ehrke 1c6f666bbf
adjust Calendar resource / room interfaces to use class implementation
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-10-08 01:25:20 +02:00
Roeland Jago Douma 60a34179c9
Remove deprecated publishActivity function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-05 12:55:45 +02:00
Morris Jobke 8ede3f6346
Merge pull request #11446 from nextcloud/bugfix/10678/pretty-urls-dont-work
Allow overwrite.cli.url without trailing slash
2018-10-02 23:39:30 +02:00
Morris Jobke 6b730b4c47
Merge pull request #11390 from nextcloud/feature/11043/apptoken_v3
Apptoken v3: imrpove token handling on external password change
2018-10-02 21:45:10 +02:00
Roeland Jago Douma 19f84f7b54
Add tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-02 19:50:54 +02:00
Roeland Jago Douma 00e99af586
Mark token as invalid if the password doesn't match
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-02 19:50:44 +02:00
Morris Jobke 7005ff420e
Fix tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-10-02 18:37:57 +02:00
Michael Weimann d855c38e07
Moves the logo files to logo
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-10-02 08:37:54 +02:00
Roeland Jago Douma 956fe1b867
Generate backups code notification if not enable but 2fa is
Generate a notification to generate backup codes if you enable an other
2FA provider but backup codes are not yet generated.

* Add event listner
* Insert background job
* Background job tests and emits notification every 2 weeks
* If the backup codes are generated the next run will remove the job

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-01 15:35:25 +02:00
Daniel Kesselberg 9dae927b0c Add more test cases
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-30 12:24:38 +02:00
Christoph Wurst 259c0ce11d
Add mandatory 2FA service/class
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-30 11:47:29 +02:00
Daniel Kesselberg c275beeceb
Allow url without / for overwrite.cli.url
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-28 22:32:19 +02:00
Christoph Wurst f71ffc73db
Remove unused constructor argument
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-27 09:44:21 +02:00
Christoph Wurst 0259792614
Reduce settings manager complexity by loading sections via DI
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-27 09:44:21 +02:00
blizzz ff55bcdad5
Merge pull request #11150 from nextcloud/feature/noid/unit-test-find-webroot
Extract logic for webroot into method and add test
2018-09-26 15:22:30 +02:00
Morris Jobke ee73f6c416
Merge pull request #11240 from nextcloud/feature/noid/consider-openssl-settings-from-config.php
Consider openssl settings from config.php
2018-09-25 18:04:20 +02:00
Christoph Wurst 7586b19e52
Only allow 2FA state changs if providers support the operation
Ref https://github.com/nextcloud/server/issues/11019.

Add `twofactorauth:cleanup` command

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-25 09:54:20 +02:00
Daniel Kesselberg 2440ee6b84
Add simple unit test for findLanguageFromLocale
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-23 20:12:00 +02:00
Daniel Kesselberg 6bdcec67ab
Add openssl to mock
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-16 12:38:08 +02:00
Daniel Kesselberg 3b7ac0c94d
Change visibility to private
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-13 12:24:06 +02:00
Daniel Kesselberg fabd3e7ba1
Restore previous state for OC::$CLI
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-11 17:22:10 +02:00
Daniel Kesselberg 603a578a1c
Change return false to throw new
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-10 22:45:40 +02:00
Daniel Kesselberg 62c03beb1d
Extract logic for webroot into method and add test
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-10 22:33:35 +02:00
Christoph Wurst ff58732c0d
Add breadcrumb support to crash reporters
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-05 20:58:39 +02:00
sualko 61370549f3 Allow same section class for multiple section types (fix #10764)
Signed-off-by: Klaus Herberth <klaus@jsxc.org>
2018-08-25 17:32:19 +02:00
Morris Jobke bb2336f389
Merge pull request #10526 from steiny2k/HEICHEIF
Support HEIC for previews
2018-08-22 13:41:19 +02:00
Michael Weimann 2bab916c53
Adds license to files. Updates the branch.
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-08-20 20:46:23 +02:00
Michael Weimann 7aed47f776
Adds tests for the memory checks
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-08-20 15:24:10 +02:00
Michael Weimann 1d2bc9c45e
Adds tests for the setup memory limit checks
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-08-20 15:24:10 +02:00
blizzz 4b92a0986c
Merge pull request #10712 from nextcloud/fix/noid/check_if_provider_is_available_before_use
Check if a preview provider is available before using it
2018-08-20 13:21:16 +02:00
Roeland Jago Douma 5b103744c8
Check if a preview provider is available before using it
Else if a preview provider is registerd but not available (for example
missing support in some external lib). It will do 💥. This way the
providers can at least do the sanity checks required.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-08-17 20:51:35 +02:00
Sebastian Steinmetz 5a996b5f87 Address comments from @rullzer:
- implement isAvailable
 - run tests only if ImageMagick with HEIC support is available in the
   environment

Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
2018-08-17 18:37:23 +02:00
Bjoern Schiessle 325e8bea16
add deck and mail to the groupware bundle, remove talk
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-08-17 13:27:48 +02:00
blizzz 8601bbc35d
Merge pull request #10621 from nextcloud/feature/noid/add-tos-to-enterprise-bundle
Add the ToS app to the enterprise bundle
2018-08-13 15:47:15 +02:00
Daniel Kesselberg bfa49410a2
Drop support for xcache
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-08-12 17:14:08 +02:00
Sebastian Steinmetz 8a7bc3fb03 Testcase for HEIC image (similar to the ImageTest)
Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
2018-08-11 01:22:57 +02:00
Roeland Jago Douma 7aad5b7721
Merge pull request #10543 from nextcloud/ignore-deactivated-users
Do not show deactivated users in sharees and contacts
2018-08-10 15:01:14 +02:00
Christoph Wurst 5c70aa2a22
Remove unused import
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-10 09:30:17 +02:00
Christoph Wurst 1124b87bc0
Fix 2FA being enforced if only backup codes provider is active
Fixes https://github.com/nextcloud/server/issues/10634.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-10 09:26:40 +02:00
Roeland Jago Douma 8c1e75e052
Do not use file as template parameter
Using file will overwrite the $file parameter in the template base.
Leading to trying to include a file that is the exception message. Which
will of course fail.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-08-09 16:45:25 +02:00
Joas Schilling e1d3965883
Add the ToS app to the enterprise bundle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-09 16:12:48 +02:00
Christoph Wurst 8db66d5dfb
Fix double-inserts of the same provider state
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-09 13:56:04 +02:00
Christoph Wurst 85bc5edb5e
Add integration/unit test for the double-insert of same values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-09 13:43:00 +02:00
Roeland Jago Douma 0757c52980
Merge pull request #10588 from nextcloud/fix/single-2fa-provider-login-redirect
Fix login redirection if only one 2FA provider is active
2018-08-09 12:27:29 +02:00
Björn Schießle 6aa6d2186c
Merge pull request #10255 from nextcloud/add-support-for-room-shares
Add support for room shares
2018-08-09 10:44:11 +02:00
Christoph Wurst d8197f2b97
Rename providerset method to get primary providers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-08 20:28:21 +02:00
Björn Schießle 11e99859ef
Merge pull request #10397 from nextcloud/encryption-s3-fix
make file cache updates more robust
2018-08-08 18:27:18 +02:00
Christoph Wurst c6e47e8a51
Fix login redirection if only one 2FA provider is active
Fixes https://github.com/nextcloud/server/issues/10500.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-08 15:25:59 +02:00
Daniel Calviño Sánchez 4b7fa4ac2e Add support for tokens in room shares
Tokens will be used to give access to a share to guests in public rooms.
Although the token itself is created in the provider of room shares and
no changes are needed for that, due to the code structure it is
necessary to explicitly call the provider from the manager when getting
a room share by token.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:44 +02:00
Roeland Jago Douma 6b1ba9cdaf
Merge pull request #10553 from nextcloud/bugfix/10518/disable-oracle-enforcement-for-now
Disable Oracle enforcement for now until the following issues are sol…
2018-08-08 14:10:18 +02:00