Commit Graph

5683 Commits

Author SHA1 Message Date
Morris Jobke 392e64395a Merge pull request #6247 from nextcloud/oauth-state-undefined
Fix undefined index oauthState
2017-09-06 19:47:24 +02:00
Morris Jobke 5d4540f179 Merge pull request #6364 from nextcloud/fix_login_loop
Fix login with basic auth
2017-09-06 17:04:00 +02:00
Morris Jobke 444779ce96
Fix tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-06 16:38:24 +02:00
Morris Jobke 15cd21d252 Merge pull request #6358 from nextcloud/fix-mixup-of-id-and-name
Set the meta data before everything
2017-09-05 16:08:57 +02:00
Morris Jobke 4e3c39c1d1
Fix tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-05 13:55:36 +02:00
Roeland Jago Douma b96485b6bd
Fix login with basic auth
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-09-05 12:24:41 +02:00
Joas Schilling dea011243e
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-04 17:01:31 +02:00
Morris Jobke 4fd3240b5f Merge pull request #6254 from nextcloud/async-bus-split
Allow configuring different command bus backends
2017-09-04 14:22:06 +02:00
Morris Jobke 1ebf91ec16
Add proper EOL
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-04 14:21:44 +02:00
Morris Jobke 0326c2c54f
Fix broken tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-04 14:17:03 +02:00
Roeland Jago Douma 84ea66dca8 Merge pull request #6296 from nextcloud/improve_2fa
Improve 2FA
2017-08-31 10:52:40 +02:00
Roeland Jago Douma 84b7022118
Improve 2FA
* Store the auth state in the session so we don't have to query it every
time.
* Added some tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-29 20:27:36 +02:00
Joas Schilling 0aff1c9268
Return the user id in case of an error
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-29 11:10:30 +02:00
Morris Jobke 0b652648cc Merge pull request #6177 from nextcloud/properly-add-slo-url
Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
2017-08-26 18:50:52 +02:00
Björn Schießle 60ee450809 Merge pull request #5870 from nextcloud/generate-system-wide-key-pair
extend the identity proof manager to allow system wide key pairs
2017-08-24 18:36:35 +02:00
Robin Appelman 9731350ace split async test bus for easier subclassing 2017-08-24 16:06:37 +02:00
Roeland Jago Douma 9357cf735a Merge pull request #6164 from nextcloud/dont-show-error-message-when-sql-failed
Prevent SQL error message in case of error
2017-08-23 16:49:57 +02:00
Lukas Reschke 2e4cd44556
Inject \OCP\IURLGenerator to make tests work
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-18 15:32:40 +02:00
Joas Schilling d5c6d56170
No password reset for disabled users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-18 13:21:53 +02:00
Lukas Reschke a04feff9a7
Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
Any `\OCP\Authentication\IApacheBackend` previously had to implement `getLogoutAttribute` which returns a string.
This string is directly injected into the logout `<a>` tag, so returning something like `href="foo"` would result
in `<a href="foo">`.

This is rather error prone and also in Nextcloud 12 broken as the logout entry has been moved with
054e161eb5 inside the navigation manager where one cannot simply inject attributes.

Thus this feature is broken in Nextcloud 12 which effectively leads to the bug described at nextcloud/user_saml#112,
people cannot logout anymore when using SAML using SLO. Basically in case of SAML you have a SLO url which redirects
you to the IdP and properly logs you out there as well.

Instead of monkey patching the Navigation manager I decided to instead change `\OCP\Authentication\IApacheBackend` to
use `\OCP\Authentication\IApacheBackend::getLogoutUrl` instead where it can return a string with the appropriate logout
URL. Since this functionality is only prominently used in the SAML plugin. Any custom app would need a small change but
I'm not aware of any and there's simply no way to fix this properly otherwise.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-18 12:22:44 +02:00
Morris Jobke 0d956cb4aa Merge pull request #6161 from nextcloud/drone-s3
Enable S3 tests on drone again
2017-08-17 19:18:13 +02:00
Lukas Reschke ed8a98eaa1
Prevent SQL error message in case of error
`\OC\User\Database::createUser` can throw a PHP exception in case the UID is longer than
permitted in the database. This is against it's PHPDocs and we should cast this to `false`,
so that the regular error handling triggers in.

The easiest way to reproduce is on MySQL:

1. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel
2. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel again
3. See SQL exception as error message

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-17 12:08:40 +02:00
Morris Jobke 1c38a83927 Always log cron execution
There was a setting to disable the last execution of cron. There is no known
problem with this write access and it was also questioned when this feature
was build in https://github.com/owncloud/core/pull/7689#issuecomment-38264707

Recently there was also a bug report about a non-visible last cron execution
(#6088) - let's better remove this.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-17 09:45:11 +02:00
Morris Jobke 4ee4d15f01 Enable object storage tests again
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-17 09:40:12 +02:00
Morris Jobke 96a404dfb3 Remove windows config settings in tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-17 09:39:49 +02:00
Morris Jobke a55e794bfd Cleanup unused methods
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-15 14:29:26 +02:00
Morris Jobke cf7c4a4439 Merge pull request #6123 from nextcloud/cleanup-shareItem
Cleanup usage of shareItem in internal code base
2017-08-15 13:57:00 +02:00
Morris Jobke c5f14ac884 Merge pull request #6121 from nextcloud/cleanup-registerBackend
Use proper methods for registerBackend
2017-08-15 13:52:49 +02:00
Morris Jobke 8366dfa50b Cleanup usage of shareItem in internal code base
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-15 11:57:18 +02:00
Morris Jobke 895b9c2309 Use proper methods for registerBackend
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-15 11:29:15 +02:00
Morris Jobke 3e13e94254 Use proper methods for checkPasswordProtectedShare
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-15 11:28:05 +02:00
Morris Jobke f640b56bfa Cleanup unused methods
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-15 10:09:47 +02:00
Bjoern Schiessle bae5be3dc1
add prefix to user and system keys to avoid name collisions
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-10 14:27:35 +02:00
Bjoern Schiessle 9524badccc
extend the identity proof manager to allow system wide key pairs
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-10 14:27:35 +02:00
Daniel Calviño Sánchez 0c8627a7ee Add acceptance tests for setting the color in the Theming app
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 12:37:57 +02:00
Daniel Calviño Sánchez 63004c8ce5 Add getter for the timeout multiplier
In some cases the acceptance tests have to explicitly wait for something
to happen without using the "find" method from the actor; in those cases
the timeout multiplier needs to be taken into account too, so the test
cases must be able to retrieve it from the actor.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 12:37:56 +02:00
Roeland Jago Douma 1ea7f14f0a
Fix SessionTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 16:13:54 +02:00
Roeland Jago Douma 26bf0ca9d4
Fix RepairMimeTypeTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 16:04:57 +02:00
Roeland Jago Douma db27bbf90d
Fix CacheTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 16:01:09 +02:00
Roeland Jago Douma ba7cf03daf
Fix LostControllerTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 15:51:13 +02:00
Roeland Jago Douma 8b0051eb40
Fix encryption test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 15:51:08 +02:00
Roeland Jago Douma 3bd104ef7c
Fix LoginController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-09 15:12:02 +02:00
Roeland Jago Douma ed3b391e47
Use symfony/translation for L10N plurals
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-07 19:53:36 +02:00
Roeland Jago Douma 4633717f04
Move pre_shared and post_shared events to EventDispatcher
* Now listeners for those events get proper share objects.
* Legacy hooks still fired
* Updated tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-03 15:14:29 +02:00
Joas Schilling 2f8756754f
Fix last failures with oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Joas Schilling 293dea0625
Fix querybuilder and functionbuilder tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Joas Schilling 20f8d1094a
Can not insert auto increment on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Joas Schilling 106df7bc33
Fix missing escape on column and table name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Lukas Reschke f93a82b8b0
Remove explicit type hints for Controller
This is public API and breaks the middlewares of existing apps. Since this also requires maintaining two different code paths for 12 and 13 I'm at the moment voting for reverting this change.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 17:32:03 +02:00
Morris Jobke 84c22fdeef Merge pull request #5907 from nextcloud/add-metadata-to-throttle-call
Add metadata to \OCP\AppFramework\Http\Response::throttle
2017-08-01 14:43:47 +02:00
Morris Jobke 6010c4f267 Merge pull request #5877 from nextcloud/typehint_middleware
Prop argument type for Middleware
2017-08-01 14:28:16 +02:00
Roeland Jago Douma c8452803ef Merge pull request #5897 from nextcloud/add-share-mail-for-user-share
Send an email once a file/folder is shared with a user
2017-08-01 13:27:15 +02:00
Morris Jobke 582fb5d129 Update the URLs in tests to use example.org
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-08-01 11:16:04 +02:00
Roeland Jago Douma 2fae696d35
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 08:20:17 +02:00
Lukas Reschke dfd8125aeb
Replace wrong PHPDocs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:16 +02:00
Lukas Reschke c25e782dd6
Fix settings/Controller/
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:15 +02:00
Lukas Reschke e1f52fc901
Stricter phan config fixes
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:13 +02:00
Roeland Jago Douma fa2f122e09 Merge pull request #5890 from nextcloud/fix-403-and-404-redirect
Fix 403 and 404 redirect
2017-07-31 22:14:52 +02:00
Roeland Jago Douma f71dc7523f
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-31 16:54:19 +02:00
Roeland Jago Douma 3548603a88
Fix middleware implementations signatures
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-31 16:54:19 +02:00
Morris Jobke c43abe43b0 Send an email once a file/folder is shared with a user
* only if user has set an email address
* only for user shares (no group shares for now)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-28 08:36:11 +02:00
Lukas Reschke f22ab3e665
Add metadata to \OCP\AppFramework\Http\Response::throttle
Fixes https://github.com/nextcloud/server/issues/5891

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-27 14:17:45 +02:00
Morris Jobke c27498db71 Use IConfig instead of static OCP\Config
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-27 13:43:18 +02:00
Morris Jobke 0de90cfc67 Fix 403 and 404 redirect
* Nextcloud is not properly loaded in the standalone version (especially the theming)
* it is already not listed anymore in the Nginx config (see nextcloud/documentation#392)
* the index.php-free version doesn't support this

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-26 16:30:09 +02:00
Lukas Reschke 013d7483bf Add new bundle
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-26 11:49:03 +02:00
Lukas Reschke 3faef644a1 Merge pull request #5864 from nextcloud/legacy_user
Remove legacy OC_User_Backend and OC_User_Interface
2017-07-25 17:15:11 +02:00
Morris Jobke 8d751ff2b4 Merge pull request #5825 from nextcloud/more-move-tests
add tests for renaming paths with multibyte utf8 characters
2017-07-25 10:32:33 +02:00
Roeland Jago Douma b930f32e89
Remove legacy OC_User_Backend and OC_User_Interface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 20:42:55 +02:00
Morris Jobke ae13d011d1 Remove unneeded styles
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-24 11:09:14 +02:00
Lukas Reschke bb6fe6afba
Adjust to height=120
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-24 10:18:16 +02:00
Lukas Reschke ba1e16ea2e Revert "Set max-width of image to 100px in Outlook as well" 2017-07-24 10:14:47 +02:00
Roeland Jago Douma 989614f9d5 Merge pull request #5783 from nextcloud/outlook-max-width
Set max-width of image to 100px in Outlook as well
2017-07-24 07:15:41 +02:00
Morris Jobke a98f57ebd0 Set max-width of image to 100px in Outlook as well
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-23 23:15:21 +02:00
Robin Appelman 89aaded07f add tests for renaming paths with multibyte utf8 characters
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-22 11:05:05 +02:00
Robin Appelman 06a4d6b5b9 Also repair storage id's when repairing invalid entries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-21 14:06:13 +02:00
Lukas Reschke 1c1ff82c06 Merge pull request #5802 from nextcloud/rm_dep_controller_functions
Remove deprecated Controller Functions
2017-07-21 10:12:20 +02:00
Roeland Jago Douma e5bedd8947 Merge pull request #5818 from nextcloud/ocs_privatedata
PrivateData to app
2017-07-21 09:47:49 +02:00
Morris Jobke b1954bed97 Merge pull request #5797 from paulijar/share20-postUnshareFromSelf
Dispatch event postUnshareFromSelf when the recipient of a share unshares it
2017-07-21 09:32:49 +02:00
Roeland Jago Douma 7753b93aa6
PrivateData to app
* PrivateData is an app now: https://github.com/nextcloud/privatedata
* No need to load the OCS routes.php (as there is none!)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-21 08:51:14 +02:00
Pauli Järvinen 7c4a15f215 Emit hook postUnshareFromSelf when the recipient of a share unshares it
- This kind of hook signal used to be emitted in the old Share library but it was missing from Share 2.0

Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
2017-07-20 14:45:46 +03:00
Roeland Jago Douma 0b495ceff8
Remove deprecated Controller Functions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-20 11:03:12 +02:00
Daniel Calviño Sánchez c37329005e Add option to acceptance test runner to set the Selenium server
By default "127.0.0.1:4444" is used, so nothing needs to be set when the
acceptance tests and the Selenium server share the same network (like
when called by "run.sh").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 07:56:51 +02:00
Daniel Calviño Sánchez 2fe8cad710 Add option to acceptance test runner to set the Nextcloud server domain
By default "127.0.0.1" is used, so nothing needs to be set when the
Selenium server and the Nextcloud test server share the same network
(like when called by "run.sh").

Besides passing the domain to the acceptance tests the Nextcloud test
server configuration must be modified to see the given domain as a
trusted domain; otherwise the access would be forbidden.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 07:54:39 +02:00
Daniel Calviño Sánchez 8e9c12eed9 Make possible to configure the domain for the Nextcloud test server
The NextcloudTestServerLocalHelper started the PHP built-in web server
for the Nextcloud test server at 127.0.0.1; as the Selenium server has
to access the Nextcloud test server they were forced to share the same
network. Now, the domain at which the PHP built-in web server is started
can be specified when the NextcloudTestServerLocalHelper is created,
which removes the need of sharing the same network, as the Selenium
server now can access the Nextcloud test server at an arbitrary domain.
However, by default "127.0.0.1" is still used if no domain is given.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-20 07:50:33 +02:00
Morris Jobke 49c622fcba Merge pull request #5719 from nextcloud/improve-jscombiner
Properly handle if the deps file if for some reason empty
2017-07-19 16:31:29 +02:00
Morris Jobke 2ebafb06fd Properly handle if the deps file if for some reason empty
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-19 00:10:46 +02:00
Pauli Järvinen 8dce97a3e1 Fix emitting of legacy hook post_unshare
- When a file was unshared, the legacy hook pre_unshare fired twice and the hook post_unshare did not fire at all. This was obviously a copy-paste error.

Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
2017-07-16 13:13:15 +03:00
Morris Jobke aa0a1c4174 Merge pull request #5724 from nextcloud/fix-drone
Fix drone
2017-07-14 23:33:13 +02:00
Lukas Reschke a79447c6fd Merge pull request #5699 from nextcloud/bruteforce_capability
Add bruteforce capabilities
2017-07-14 15:20:31 +02:00
Morris Jobke 9a34c5051f Fix drone
Fix service container host name
check current folder
fix redis for integration test
Fix more hostnames

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-14 15:04:18 +02:00
Morris Jobke 1f1504e071 Merge pull request #5708 from nextcloud/nested-permissions-mask
Fix scan permissions with nested permissions masks
2017-07-13 23:27:01 +02:00
Robin Appelman 350e036c56 chunk getting invalid paths and reuse queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 16:37:38 +02:00
Robin Appelman 03f27b4c2c
Fix scan permissions with nested permissions masks
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 14:29:04 +02:00
Roeland Jago Douma 6a1f2ac076
Add bruteforce capabilities
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-13 11:23:08 +02:00
Roeland Jago Douma 04f2090698
Write cert bundle to tmp file first
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-12 19:24:20 +02:00
Roeland Jago Douma 86a496d94a Merge pull request #5567 from nextcloud/public-capabilities
Public capabilities API
2017-07-12 13:04:54 +02:00
Morris Jobke 7df7d0ff3b Merge pull request #5656 from nextcloud/fix-unselecting-items-on-multi-select-dropdowns
Fix unselecting items on multi select dropdowns
2017-07-10 23:39:43 +02:00
Daniel Calviño Sánchez b43a74bdcd Add acceptance tests for unselecting items in dropdown for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-10 03:38:22 +02:00
Daniel Calviño Sánchez 71b90cdeff Extract app navigation elements to its own context
The app navigation is not exclusive to the Files app but a generic
component used by other apps too, so its locators and steps should be in
its own context.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-08 15:36:01 +02:00
Daniel Calviño Sánchez 8deab238cc Fix typo
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-08 15:33:03 +02:00
Morris Jobke b4deba2078 Merge pull request #5483 from nextcloud/issue-5075-png-files-for-activity-emails
Use PNGs for icons in activity emails
2017-07-07 11:05:00 +02:00
Morris Jobke 172b4bb6d2 Merge pull request #5615 from nextcloud/issue-5286-fix-navigation-entries-for-group-restricted-apps
Don't load navigation entries of restricted apps
2017-07-07 10:46:45 +02:00
Morris Jobke b4a221f9be Merge pull request #5424 from nextcloud/moveFromCache-from-shared
fix moving folders out of a cache jail
2017-07-06 18:31:18 +02:00
Bjoern Schiessle b43f6d295e
update file system tests to take the master key into account
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:47:12 +02:00
Bjoern Schiessle f186a5cfb1
fix and extend dav test to also test the master-key setup
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:47:11 +02:00
Bjoern Schiessle 1a55ace97c
no warning on password change if no encryption module uses per-user keys
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:47:11 +02:00
Morris Jobke 60398b919b Merge pull request #5231 from nextcloud/migrations
Migrations
2017-07-05 17:32:40 +02:00
Morris Jobke ca565644b3 Merge pull request #5621 from nextcloud/fix-sorting-of-favorite-files-in-file-list
Fix sorting of favorite files in file list
2017-07-05 17:31:41 +02:00
Morris Jobke 163e8774a4 Fix autoloader and namespace test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-05 15:46:25 +02:00
Morris Jobke 7d58bb7db5 Merge pull request #5342 from nextcloud/userlist-used-space
show used space in user list
2017-07-05 15:15:25 +02:00
Daniel Calviño Sánchez 6fa5c33af4 Add acceptance tests for sorting of favorite files
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-07-05 14:54:26 +02:00
Joas Schilling 6abbe4e962
Don't load navigation entries of restricted apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:52:51 +02:00
Morris Jobke f2b8535c7e Update unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-05 13:50:28 +02:00
Joas Schilling 0bff4f3f07 Fix the installer tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:02:16 +02:00
Joas Schilling 4e5cd1efea Fix tests of CodeChecker and MigrationService
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:02:16 +02:00
Joas Schilling 15eec7b83c Start migrations
Fixme:
- Install and update of apps
- No revert on live systems (debug only)
- Service adjustment to our interface
- Loading via autoloader

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-05 13:01:19 +02:00
Morris Jobke efa52ec111 Merge pull request #5441 from nextcloud/custom-theme-update
Add command to apply updates to custom themes
2017-07-05 12:44:43 +02:00
Julius Härtl 2e47210d6f Add command to apply updates to custom themes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-07-05 12:38:07 +02:00
Julius Härtl 01093604d3
Add tests for public capabilties
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-06-30 11:21:15 +02:00
blizzz 72d3bfcf56 Merge pull request #4890 from nextcloud/unify-settings
Unify settings
2017-06-29 20:02:09 +02:00
Robin Appelman 601362e164
adjust to moved repair step
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-29 14:45:08 +02:00
Arthur Schiwon 010a3c09f2
… and their tests needed adjustments, too
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-29 14:38:22 +02:00
Lukas Reschke 57c5a15e41 Merge pull request #5490 from nextcloud/add-clear-site-data-header
Add Clear-Site-Data header
2017-06-29 13:32:46 +02:00
Arthur Schiwon 6b5bbe1880
try to lower the timeout in an acceptance test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-26 14:42:07 +02:00
Arthur Schiwon cfa5eea902
fix typos and unnecessary white spaces
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-26 10:30:42 +02:00
Arthur Schiwon b6b19346b4
forgotten test adjustments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 22:19:18 +02:00
Arthur Schiwon 8750d5b802
take out additional (legacy) settings section from tests
because it is dependent whether anything else registers into it and
\OC_App is static

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 14:34:55 +02:00
Arthur Schiwon 26ca563545
Fix and extend acceptance tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:38:05 +02:00
Arthur Schiwon ab814e7786
drone wasn't satisfied yet
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:37:43 +02:00
Arthur Schiwon 1cdb49d6db
adjust another test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:37:42 +02:00
Arthur Schiwon 0762d3dd3e
…and adjust tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:37:42 +02:00
Arthur Schiwon 28fd18de43
add missing pieces to Settings Manager and fix and extend its unit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:37:41 +02:00
Morris Jobke d611d9c126 Merge pull request #5498 from nextcloud/allow-to-force-a-language
Allow to force a language and set it via the ocs api
2017-06-22 12:47:00 -05:00
Jan-Christoph Borchardt fd63577089 Improve wording of various error messages
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-06-21 14:51:59 -05:00
Robin Appelman d3c20eefca
Add repair step for invalid paths
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-21 15:52:27 +02:00
Joas Schilling 7816c54625
Allow to force a language and set it via the ocs api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-21 11:34:52 +02:00
Lukas Reschke 2f87fb6b45
Add Clear-Site-Data header
This adds a Clear-Site-Data header to the logout response which will delete all relevant data in the caches which may contain potentially sensitive content.

See https://w3c.github.io/webappsec-clear-site-data/#header for the definition of the types.

Ref https://twitter.com/mikewest/status/877149667909406723

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-06-20 19:46:10 +02:00
Joas Schilling ca3a6ec607
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-20 14:25:24 +02:00
Julius Härtl 41621d3b59
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-06-16 11:06:26 +02:00
Julius Härtl f039ba7480
Add tests and inject IRequest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-06-16 10:51:31 +02:00
Robin Appelman 2e8e6f95b9
show used space in user list
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-15 14:06:54 +02:00
Robin Appelman fa81759917
fix moving folders out of a cache jail
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-15 13:59:06 +02:00
Joas Schilling 0f8c1b13a3
Fix unknown share token
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-13 18:44:50 +02:00
Morris Jobke 6a06df824e Merge pull request #5027 from nextcloud/require-nextcloud-version-as-per-docs
Version and dependency are now required
2017-06-12 22:33:16 -05:00
Morris Jobke aa243376ef Merge pull request #5271 from nextcloud/use-mailer-to-create-email-template
Also use IMailer interface to generate the email template
2017-06-12 17:52:52 -05:00
Lukas Reschke a4b48d55ad
Fix tests
return is not defined

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-06-12 22:19:44 +02:00
Daniel Calviño Sánchez 6bcace4609 Extract toggle visibility of a SystemTagsInfoView to its own view
The SystemTagsInfoViewToggleView is a basic view that renders a label
that, when clicked, toggles the visibility of an associated
SystemTagsInfoView.

In order to keep the view parent agnostic its attachment and detachment
to/from the MainfFileInfoView is done in the FilesPlugin.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 09:13:29 +02:00
Daniel Calviño Sánchez 423136d319 Extract duplicated code to a method
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 03:03:47 +02:00
Daniel Calviño Sánchez be02b3df28 Add acceptance tests for showing the input field for tags
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-06-09 03:02:33 +02:00
Morris Jobke b58928b4c1 Also use IMailer interface to generate the email template
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-06-06 10:47:48 -05:00
Morris Jobke 15314b6f5b Merge pull request #5223 from nextcloud/do-not-allow-to-set-invisible-fields
Don't allow the user to set fields they can't see
2017-06-06 08:06:39 -05:00
Joas Schilling f39fdaf46e
adjust the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-06 11:42:48 +02:00
blizzz 2e2d406bf5 Merge pull request #5213 from nextcloud/fix-change-hook
Trigger changeUser hook only on real changes
2017-06-02 13:14:33 +02:00
Arthur Schiwon 999455c1aa
emit changeUser only if there really was a change (quota, displayname)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-01 11:34:17 +02:00
Bjoern Schiessle 7c2d473d76
add new config switched for the global scale architecture
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-05-29 18:19:28 +02:00
Joas Schilling eebd2811dc
Version and dependency are now required
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-22 09:54:44 +02:00
Roeland Jago Douma 43eb424da1 Merge pull request #5009 from nextcloud/update-acceptance-tests-for-issue-4921
Update acceptance tests for issue #4921
2017-05-22 08:36:11 +02:00
Daniel Calviño Sánchez 41412088db Update acceptance tests for issue #4921
Acceptance tests opened the details view by clicking on the middle of
the file row, but due to the changes made in issue #4921 that now opens
the file instead; this commit updates the acceptance tests to open the
details view through the "Details" item in the file actions menu.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-21 14:45:43 +02:00
Lukas Reschke 7a8bd73547 Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-20 16:38:32 -05:00
Lukas Reschke 7976927628 Merge pull request #4894 from nextcloud/generic-security-activities
Change 2FA activities to more generic security activities
2017-05-19 00:50:44 +02:00
Lukas Reschke 8c624bdef9 Merge pull request #4792 from nextcloud/fix-storage-wrappers-on-scanner
Make sure we use the passed-in storage when there is one
2017-05-19 00:49:58 +02:00
Roeland Jago Douma e43649e67e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-18 22:10:57 +02:00
Christoph Wurst 1632bb4557
Move activities test code
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-05-18 22:10:57 +02:00
Lukas Reschke 7927aed991
Adjust token name
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:11 +02:00
Lukas Reschke 691646bdae
Add tests for OAuth2 app
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:10 +02:00
Lukas Reschke 59e968977c
Add test for DefaultTokenMapper
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:09 +02:00
Lukas Reschke 77827ebf11
Rename table back to lowercase
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:09 +02:00
Lukas Reschke 26ee889fec
Add tests for ClientFlowLoginController
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-18 20:49:08 +02:00
Bjoern Schiessle 1eb7f4956b
delete auth token when client gets deleted
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-05-18 20:49:07 +02:00
Robin Appelman 1f1e1b0d00
use unmasked permissions during scanning
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-05-18 16:38:54 +02:00
Morris Jobke 78e6c2dea4 Merge pull request #4666 from nextcloud/enable-redis-cluster
Add redis cluster tests to our CI jobs
2017-05-16 10:10:25 -05:00
Morris Jobke 3bf9503070 Merge pull request #4816 from nextcloud/Ardinis-quota-files_external
Correctly calculate used space for quota with external storage
2017-05-12 11:33:54 -05:00
Morris Jobke 51c55a867d fix quota tests for external storage
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-12 11:32:16 -05:00
Lukas Reschke 4f752ed1fc Merge pull request #4809 from nextcloud/downstream-27676
Disable reset password link
2017-05-12 12:39:07 +02:00
Lukas Reschke 48a9a4bd81 Merge pull request #4825 from nextcloud/add-timeout-appstore
Add timeout for requests to appstore
2017-05-12 12:37:18 +02:00
Joas Schilling e6a0ad4701
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-12 10:02:15 +02:00
Joas Schilling adad4281af
Fix failed assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-12 09:58:18 +02:00
Morris Jobke f73ca1b77f Add redis cluster tests to our CI jobs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-11 17:07:20 -05:00
Joas Schilling 0828df5ed4
Disable the API endpoints as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-11 17:03:57 +02:00
Joas Schilling 538d32fe87
Automatic injection into the Fetchers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:56:38 +02:00
Joas Schilling ca39940614
Automatic creation of Identity manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:45:11 +02:00
Joas Schilling d418ea550b
Automatic injection for CssController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:42:40 +02:00
Joas Schilling 9c8fe82000
Automatic injection for JsController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-10 09:42:15 +02:00
Morris Jobke 1a83f11925 Merge pull request #4718 from nextcloud/handle-stalled-or-invisible-elements-automatically-in-acceptance-tests
Handle stale or invisible elements automatically in acceptance tests
2017-05-08 12:52:30 -05:00
Fabrizio Steiner f2a2b34e46 Increase device password entropy. Use lower- and upper-case characters and digits, but exclude ambiguous characters. The number of digits has also been increased to 25.
Signed-off-by: Fabrizio Steiner <fabrizio.steiner@gmail.com>
2017-05-08 14:04:40 +02:00
Daniel Calviño Sánchez 9313c9797f Add automatic handling of common command failures of Mink elements
Commands executed on Mink elements may fail for several reasons.
ElementWrapper is introduced to automatically handle some of those
situations, like StaleElementReference exceptions and ElementNotVisible
exceptions.

StaleElementReference exceptions are thrown when the command is executed
on an element that is no longer attached to the DOM. When that happens
the ElementWrapper finds again the element and executes the command
again on the new element.

ElementNotVisible exceptions are thrown when the command requires the
element to be visible but the element is not. When that happens the
ElementWrapper waits for the element to be visible before executing the
command again.

These changes are totally compatible with the current acceptance tests.
They just make the tests more robust, but they do not change their
behaviour. In fact, this should minimize some of the sporadic failures
in the acceptance tests caused by their concurrent nature with respect
to the web browser executing the commands.

However, the ElementWrapper is not a silver bullet; it handles the most
common situations, but it does not handle every possible scenario. For
example, the acceptance tests would still fail sporadically if an
element can become staled several times in a row (uncommon) or if it
does not become visible before the timeout expires (which could still
happen in a loaded system even if the components under test work right,
but obviously it is not possible to wait indefinitely for them).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 64f9c56224 Extract element finding to a command object
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 7642a4b727 Make internal find methods static
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Daniel Calviño Sánchez 16e3e81635 Add missing type hints
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-06 12:37:55 +02:00
Morris Jobke 0896d2b006 Make cache tests a bit more clear
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-04 19:37:40 -03:00
Mario Danic e4aac15a92
Update login flow redirection
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-04 19:21:22 +02:00
Morris Jobke 61379c9165 Merge pull request #4682 from nextcloud/try-to-start-browser-sessions-again-when-they-fail-in-acceptance-tests
Try to start browser sessions again when they fail in acceptance tests
2017-05-04 00:02:18 -03:00
Daniel Calviño Sánchez 4fc9a7146b Add option to acceptance test runners to set a custom timeout multiplier
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 23:18:40 +02:00
Daniel Calviño Sánchez b10478ff19 Try again to start browser sessions when they fail
Starting a session for an Actor can fail, typically, due to a timeout
connecting with the web browser. Now if the session fails to start it
will be tried again up to "actorTimeoutMultiplier" times in total before
giving up.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 23:18:40 +02:00
Daniel Calviño Sánchez e355e953b5 Generalize attribute name
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 12:45:52 +02:00
Daniel Calviño Sánchez 97bedb94af Fix exponential increase of timeout when finding ancestor elements
The timeout passed to the "find" method was multiplied by the
"findTimeoutMultiplier" attribute. However, as "find" used
"findAncestor" and "findAncestor", in turn, used "find" itself the
timeout was increased exponentially for ancestor elements. Now "find"
was split in "find" and "findInternal"; the first method is the public
one and modifies the given parameters as needed and then calls the
second method, private, that performs the find itself.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-03 12:34:04 +02:00
Morris Jobke dbe11916fa Merge pull request #4662 from nextcloud/remove-named-selectors-from-acceptance-tests
Remove named selectors from acceptance tests
2017-05-02 20:44:23 -03:00
Morris Jobke f233e856bf Merge pull request #4665 from nextcloud/enable-redis
Add redis support to our CI jobs
2017-05-02 17:16:19 -03:00
Roeland Jago Douma 24ff230f93 Merge pull request #4620 from nextcloud/preview-error-handling
better handling of preview generation errors
2017-05-02 21:49:14 +02:00
Morris Jobke ecb369b5e8
Add redis support to our CI jobs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-02 15:55:42 -03:00
Lukas Reschke 121cb4bcfc Merge pull request #4659 from nextcloud/fix/ignore-empty-email-contacts-menu
Do not show an email action for contacts with emtpy email addresses
2017-05-02 17:02:16 +02:00
Daniel Calviño Sánchez 1381f6c131 Replace "named" Mink selectors with "named_exact" Mink selectors
The "named" Mink selector first tries to find an exact match for its
locator and then, if not found, tries to find a partial match. Besides
other harder to track problems (see comment in the commit in which the
"content" locator was removed), this could cause, for example, finding
an action link titled "Favorited" when looking for the action link
titled "Favorite" (that is, one that conveys the opposite state to the
one found).

Although currently all the acceptance tests are compatible with both the
"named" and the "named_exact" Mink selectors the predefined locators are
modified to use the "named_exact" Mink selector to make them more
future-proof; the "named" Mink selector can still be used if needed
through the "customSelector" method in the builder object.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-02 15:09:38 +02:00
Daniel Calviño Sánchez 762a8e0b76 Remove "content" locator from acceptance tests
The "content" locator uses the "named" Mink selector and the "content"
Mink locator to find the element. The "named" Mink first tries to find
the elements whose content match exactly the given content but, if none
is found, then it tries to find elements that just contain the given
content.

This behaviour can lead to hard to track issues. Finding the exact match
and, if not found, finding the partial match is done in quick
succession. In most cases, when looking for an exact match the element
is already there, it is returned, and everything works as expected. Or
it may not be there, but then it is not there either when finding the
partial match, so no element is returned, and everything works as
expected (that is, the actor tries to find again the element after some
time).

However, it can also happen that when looking for an exact match there
is no element yet, but it appears after trying to find the exact match
but before trying to find the partial match. In that situation the
desired element would be returned along with its ancestors. However, as
only the first found element is taken into account and the ancestors
would appear first the find action would be successful, but the returned
element would not be the expected one. This is highly unlikely, yet
possible, and can cause sporadic failures in acceptance tests that,
apparently, work as expected.

Using a "named_exact" Mink selector instead of the "named" Mink selector
does not provide the desired behaviour in most cases either. As it finds
any element whose content matches exactly the given content, looking for
"Hello world" in "<div><p><a>Hello world</a></p></div>" would match the
"div", "p" and "a" elements; in that situation the "div" element would
be the one returned, when typically the "a" element would be the
expected one.

As it is error prone and easily replaceable by more robust locators the
"content" locator was removed from the predefined ones (although it can
still be used if needed through the "customSelector" method in the
builder object).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-02 15:09:25 +02:00
Christoph Wurst b13c741cb3
Do not show an email action for contacts with emtpy email addresses
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-05-02 14:12:04 +02:00
Robin Appelman 2847e9f2e3
fix preview tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-05-02 13:43:48 +02:00
Roeland Jago Douma ae7c1504a9
Fix test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-02 11:38:21 +02:00
Roeland Jago Douma 762284ce93
Fix and update tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-02 08:59:53 +02:00
Lukas Reschke dd03fdebec
Add missing space
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-01 20:36:25 +02:00
Lukas Reschke a5ccb31e85
Mark IP as whitelisted if brute force protection is disabled
Currently, when disabling the brute force protection no new brute force attempts are logged. However, the ones logged within the last 24 hours will still be used for throttling.

This is quite an unexpected behaviour and caused some support issues. With this change when the brute force protection is disabled also the existing attempts within the last 24 hours will be disregarded.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-01 18:31:45 +02:00
Marius Blüm f26764c790
Rename “Server settings” to “Basic settings”
* fixes #4587

Signed-off-by: Marius Blüm <marius@lineone.io>
2017-04-29 17:13:21 +02:00
Arthur Schiwon 99e97f135d
consolidate setEnabled method
and fix a unit test

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-04-29 00:59:09 -03:00
Arthur Schiwon 668fe7df51
UserManager can now count disabled users
Users page takes advantage of that

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-04-29 00:59:09 -03:00
Morris Jobke 4c37c38051
fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-29 00:59:09 -03:00
Morris Jobke 485d6d6577
use proper return codes and handle failure cases
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-29 00:59:09 -03:00
Morris Jobke 2507e7459d
Improve wording of error messages
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-29 00:59:09 -03:00
Morris Jobke a8457df064
fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-29 00:59:09 -03:00
Morris Jobke 72550377b4
add unit tests for enable method 2017-04-29 00:59:09 -03:00
Morris Jobke e521b6799f
add unit tests for disable method 2017-04-29 00:59:09 -03:00
Morris Jobke 79d74a1425
adjust tests to have at least one disabled user 2017-04-29 00:54:30 -03:00
Roeland Jago Douma 84b4d448d0
Fix unit tests 2017-04-29 00:54:30 -03:00
Morris Jobke a0bf706983
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-29 00:13:41 -03:00
Bjoern Schiessle 9b36f2d9ea
fix unit test
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:38 -03:00
Bjoern Schiessle 5fa0e6df39
fix email verification status
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:37 -03:00
Bjoern Schiessle 71657db4be
updated unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:36 -03:00
Bjoern Schiessle cbf5acca45
check verification proof and update account table
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:36 -03:00
Morris Jobke f000e22a97 Merge pull request #4522 from nextcloud/downstream-27596
Allow to create a user for a specific backend
2017-04-27 16:41:08 -03:00
Joas Schilling 9212089151
Use the new method in the old one to remove duplicate code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-27 08:56:51 +02:00
Morris Jobke 4dab01d9ed Merge pull request #4501 from nextcloud/downstream-27144
Add duration of last job execution to the table
2017-04-26 23:16:21 -03:00
Morris Jobke 01705b1b6a Merge pull request #4515 from nextcloud/downstream-27643
Adjust query/event logging code in favour of more complex owncloud/di…
2017-04-26 22:58:01 -03:00
Morris Jobke 4a9cb81486 Merge pull request #4526 from nextcloud/downstream-27269
Don`t allow upload of files with extension .part
2017-04-26 18:21:13 -03:00
Morris Jobke aad0794500 Merge pull request #4454 from nextcloud/add-bundles-to-install-page
Add app bundles to the apps page and unbundle enterprise apps
2017-04-26 18:20:40 -03:00
Morris Jobke 58fe27f092 Merge pull request #4461 from danxuliu/fix-closing-details-view-when-viewing-file-in-folder
Fix details view not closed when viewing a file in its folder
2017-04-26 17:42:55 -03:00
Lukas Reschke d0e0bc55c8
Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:08:44 +02:00
Lukas Reschke 3df99d8fd6
Add SocialSharingBundle
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:53 +02:00
Lukas Reschke 0c5a48c4a4
Add tests for repairstep
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:52 +02:00
Lukas Reschke a05295fca3
Add spreed to Groupware bundle
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:52 +02:00
Lukas Reschke 0651d66181
Add tests for bundle code
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:51 +02:00
Lukas Reschke 3f9aaac4a2
Adjust tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:51 +02:00
Vincent Petry 1c771c097a
Use regex to detect part files 2017-04-26 16:12:48 +02:00
Piotr Mrówczyński 9fec4031b3
Adjust query/event logging code in favour of more complex owncloud/diagnostics (#27643)
* Adjust query/event logging code in favour of more complex owncloud/diagnostics
* Add descriptions to IQueryLogger and IEventLogger interfaces
2017-04-26 13:19:43 +02:00
Georg Ehrke f32fc97533
fix ContactsStoreTest
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:28:15 +02:00
Georg Ehrke 60f9ed6241
add contactsmenu popover
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:26:53 +02:00
Morris Jobke d4329f3355 Merge pull request #4449 from stweil/mimetypes
Add mimetypes for jp2 and webp
2017-04-26 01:22:49 -03:00
Morris Jobke 215573fe3c Merge pull request #4486 from nextcloud/fix-js-unit
Remove DOMPurify from srcFiles
2017-04-25 22:39:55 -03:00
Jan-Christoph Borchardt 241e397326 Merge branch 'master' into contactsmenu
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-04-26 00:50:38 +02:00
Morris Jobke 255c7df3bd Merge pull request #4499 from nextcloud/downstream-26984
Trigger change when a user is enabled/disabled
2017-04-25 18:27:38 -03:00
Christoph Wurst 98f02fad60 Adjust entry unit test to newly added avatar property
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 20:47:18 +02:00
Christoph Wurst 2c2e1f7988 Use absolute URI for action icons
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 20:47:17 +02:00
Christoph Wurst b8c2a8ae36 Don't show contacts an entry for themselves
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 20:47:17 +02:00
Christoph Wurst 36cee1f386 Let apps register contact menu provider via info.xml
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 20:47:17 +02:00
Christoph Wurst d091793ceb Contacts menu
* load list of contacts from the server
* show last message of each contact

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 20:47:17 +02:00
Roeland Jago Douma aae079aa29
AppToken to 72 chars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-25 20:18:49 +02:00
Lukas Reschke 6a16df7288
Add new auth flow
This implements the basics for the new app-password based authentication flow for our clients.
The current implementation tries to keep it as simple as possible and works the following way:

1. Unauthenticated client opens `/index.php/login/flow`
2. User will be asked whether they want to grant access to the client
3. If accepted the user has the chance to do so using existing App Token or automatically generate an app password.

If the user chooses to use an existing app token then that one will simply be redirected to the `nc://` protocol handler.
While we can improve on that in the future, I think keeping this smaller at the moment has its advantages. Also, in the
near future we have to think about an automatic migration endpoint so there's that anyways :-)

If the user chooses to use the regular login the following happens:

1. A session state token is written to the session
2. User is redirected to the login page
3. If successfully authenticated they will be redirected to a page redirecting to the POST controller
4. The POST controller will check if the CSRF token as well as the state token is correct, if yes the user will be redirected to the `nc://` protocol handler.

This approach is quite simple but also allows to be extended in the future. One could for example allow external websites to consume this authentication endpoint as well.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-25 20:18:49 +02:00
Stefan Weil 8ba67fbe1e Add test code for new image mime types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-25 19:22:46 +02:00
Lukas Reschke 16c8fdece3
Remove DOMPurify from srcFiles
It is already included via core.json

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-25 12:50:15 -03:00
Daniel Calviño Sánchez 16b4eecb05 Add acceptance tests for closing details view in Files app
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-25 17:45:37 +02:00
Noveen Sachdeva 1b1f403a5d
Add duration of last job execution to the table 2017-04-25 17:39:58 +02:00
Joas Schilling ac0c21f4a7
Trigger change when a user is enabled/disabled
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-25 17:20:35 +02:00
Morris Jobke 5a9224fb4c Merge pull request #3531 from nextcloud/theming-scss
Theming using SCSS variables
2017-04-25 10:56:13 -03:00
Morris Jobke 6f2df5e495 Merge pull request #3195 from nextcloud/settings-apps-tabular
Make apps settings tabular
2017-04-25 10:25:29 -03:00
Roeland Jago Douma 82c9eb1c56 Merge pull request #4462 from danxuliu/fix-sharing-password-protected-link
Fix sharing a password protected link
2017-04-25 14:12:44 +02:00
Julius Haertl 68a63ad3f3
Implement scss variable injection by OC_Defaults
Signed-off-by: Julius Haertl <jus@bitgrid.net>

Add Scss variables to example theme and theming app

Signed-off-by: Julius Haertl <jus@bitgrid.net>

Use SCSSCacher to build theming css

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Update theming.scss

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Code cleanup

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Fix tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Inject SCSSCacher for easier testing

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Fix typehint

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>

Generate absolute URLs

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>

Fix tests to always use absolute urls for theming images

Signed-off-by: Julius Härtl <jus@bitgrid.net>

MailheaderColor -> ColorPrimary

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-25 11:39:45 +02:00
Christoph Wurst bb1d191f82
Fix remember redirect_url on failed login attempts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-04-25 09:38:19 +02:00
Felix A. Epp 2fbf1114ac Add installed category in AppSettingsControlerTest
Signed-off-by: Felix A. Epp <work@felixepp.de>
2017-04-25 00:22:57 +02:00
Roeland Jago Douma 41f492ada7 Merge pull request #4477 from danxuliu/acceptance-macos-nitpicking
Fix minor code style issues in acceptance test runner
2017-04-24 19:30:03 +02:00
Joas Schilling 6300be160a
Add unit tests for mounts of delete users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-24 16:43:25 +02:00
blizzz 42e805f057 Merge pull request #1023 from GitHubUser4234/ldap_password_renew_pr
Handle password expiry in user_ldap
2017-04-24 12:17:04 +02:00
Daniel Calviño Sánchez a56fb75e69 Add missing unit test for updateShare with email share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-24 11:33:07 +02:00
Daniel Calviño Sánchez de6b05a911 Add missing hook check
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-24 11:33:07 +02:00
Daniel Calviño Sánchez dcc8cce28b Fix double hashing of shared link passwords
The plain text password for a shared links was hashed and, then, the
hashed password was hashed again and set as the final password. Due to
this the password introduced in the "Authenticate" page for the shared
link was always a wrong password, and thus the file could not be
accessed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-24 11:33:07 +02:00
Daniel Calviño Sánchez 316710bcb1 Add acceptance tests for sharing password protected links
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-24 11:33:07 +02:00
Daniel Calviño Sánchez 13c84f6629 Add system to share data between acceptance test steps
The data storage (the "notebook") is shared between all the actors, so
the data can be stored and retrieved between different steps by any
actor in the same scenario.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-24 11:33:07 +02:00
Daniel Calviño Sánchez b0b32eff1f Fix minor code style issues (also known as nitpicking)
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-22 17:50:37 +02:00
Morris Jobke db7eedccc9
Run acceptance tests on macOS
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-21 14:11:56 -05:00
Roeland Jago Douma eaa6f766e6 Merge pull request #4208 from danxuliu/add-basic-acceptance-test-system
Add basic acceptance test system
2017-04-21 20:53:32 +02:00
Daniel Calviño Sánchez e970b5261f Make test passwords valid for the password_policy app
As requested by Morris Jobke, the passwords in the acceptance tests were
modified to make them valid both for a clean Nextcloud server and one
with the password_policy app enabled.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-21 14:47:44 +02:00
Daniel Calviño Sánchez 2f80025ec2 Move acceptance tests from build/acceptance to tests/acceptance
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-04-21 14:44:29 +02:00
Joas Schilling ec2f2b75be
Make sure we use a new encryption module all the time
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 13:48:14 +02:00
Joas Schilling 06e60f88c5
Don't assume the admin didn't configure Opcache correctly...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 13:17:21 +02:00
Joas Schilling b2deb6deb0
Use the correct class
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:55:11 +02:00
Joas Schilling 0de5fc9020
Import some classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:54:14 +02:00
Joas Schilling ada615eb86
Use the correct Dummy and Backend class
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:48:51 +02:00
Joas Schilling 9871e4eaee
Kill dead code
> No tests found in class "Test\Share\MailNotificationsTest".

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:43:19 +02:00
Joas Schilling d2d9f74707
Fix warning with undefined method
Trying to configure method "getRemember" which cannot be configured
because it does not exist, has not been specified, is final, or is
static

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:37:59 +02:00
Joas Schilling a0ada9aab4
Don't use deprecated getMock() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:30:21 +02:00
Joas Schilling 24789ba0f4
Restoring the error handler within the error handler causes unexpected results
See http://php.net/manual/en/function.restore-error-handler.php#120879
for more information.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:23:34 +02:00
Joas Schilling 38c901fadf
Delete the correct config value
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 12:23:12 +02:00
Joas Schilling 140580f9d8 Merge pull request #4398 from nextcloud/fix_accesslistcode
Get proper accesslist for userFolder
2017-04-20 11:03:22 +02:00
Joas Schilling b469882595 Merge pull request #4212 from individual-it/master
validate file name before uploading in upload only folder
2017-04-20 10:50:56 +02:00
Roeland Jago Douma ae2db5e60d
Get proper accesslist for userFolder
If the accesslist is requested for a users root folder we should
properly construct the path

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-20 10:28:32 +02:00
Morris Jobke 16c4755e03
Rename renderHTML to renderHtml
* fixes #4383
* improves consistency

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-19 15:46:41 -05:00
Roeland Jago Douma ad24b86013 Merge pull request #4350 from nextcloud/adjust-old-bruteforce-protection-annotations
Adjust existing bruteforce protection code
2017-04-19 09:27:23 +02:00
Morris Jobke f1ddb939a0 Merge pull request #4371 from nextcloud/dont-allow-dot-usernames
Better validation of allowed user names
2017-04-18 20:04:32 -05:00
Morris Jobke 269600a04f Merge pull request #4369 from nextcloud/fix-translations
Fix translations
2017-04-18 18:01:50 -05:00
Joas Schilling 1c0bffe87f
Fix translations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-18 16:40:53 -05:00
Lukas Reschke 0a54d5a5dd
Beautify test email
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-18 16:18:00 -05:00
Morris Jobke d379ac7545 Merge pull request #4372 from nextcloud/smtp-password
Don't put the SMTP password into the HTML code
2017-04-18 16:13:31 -05:00
Morris Jobke d2c4440ed6
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-18 15:08:38 -05:00
Lukas Reschke 805419bb95
Add bruteforce protection to changePersonalPassword
While the risk is actually quite low because one would already have the user session and could potentially do other havoc it makes sense to throttle here in case of invalid previous password attempts.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-18 17:55:51 +02:00
Artur Neumann 88f02f27a3 JS tests for upload only function
Signed-off-by: Artur Neumann <info@individual-it.net>
2017-04-18 20:43:25 +05:45
Joas Schilling fcaa315c96
Fix some more stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-18 16:11:29 +02:00
Joas Schilling dfca672378
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-18 16:08:29 +02:00
Joas Schilling a3922bbcdc
Better validation of allowed user names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-18 14:29:34 +02:00
Morris Jobke 10290eb006 Merge pull request #2834 from nextcloud/accesListToShareManager
Access list to share manager
2017-04-15 13:06:24 -05:00
Lukas Reschke 727688ebd9
Adjust existing bruteforce protection code
- Moves code to annotation
- Adds the `throttle()` call on the responses on existing annotations

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-14 13:42:40 +02:00
Lukas Reschke 8149945a91
Make BruteForceProtection annotation more clever
This makes the new `@BruteForceProtection` annotation more clever and moves the relevant code into it's own middleware.

Basically you can now set `@BruteForceProtection(action=$key)` as annotation and that will make the controller bruteforce protected. However, the difference to before is that you need to call `$responmse->throttle()` to increase the counter. Before the counter was increased every time which leads to all kind of unexpected problems.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 23:05:33 +02:00
Lukas Reschke 81d3732bf5 Merge pull request #4308 from nextcloud/lost-password-email
Update email template for lost password email
2017-04-13 20:02:15 +02:00
Morris Jobke d36751ee38 Merge pull request #2424 from nextcloud/fix-login-controller-test-consolidate-login
Fix login controller test and consolidate login
2017-04-13 12:16:38 -05:00
Joas Schilling e1d54e3b48
Add more tests for the share helper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:53 +02:00
Joas Schilling 7d416ac1dd
Activate the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:53 +02:00
Joas Schilling 629b7c0fc3
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:52 +02:00
Joas Schilling 4eeb194ae5
Fix share manager test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:52 +02:00
Joas Schilling 5b57bb955b
Fix default share provider
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:52 +02:00
Joas Schilling 2fcf334c6a
Fix tests for ShareHelper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-13 12:58:52 +02:00
Roeland Jago Douma 4437e00f16
Add shareHelper test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 12afd7d1d5
Add mail element to access list
* Each provider just returns what they have so adding an element won't
require changing everything
* Added tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 2cbac3357b
Offload acceslist creation to providers
* This allows for effective queries.
* Introduce currentAccess parameter to speciy if the users needs to have
currently acces (deleted incomming group share). (For notifications)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:50 +02:00
Roeland Jago Douma 553b3b2928
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:49 +02:00
Roeland Jago Douma 7dcc98eb20
Add owner to access list
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:49 +02:00
Roeland Jago Douma d84df15590
Add getAccessList to ShareManager
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-13 12:58:48 +02:00
Lukas Reschke e39e6d0605
Remove expired attempts
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 12:00:18 +02:00
Lukas Reschke 31ae39c569
Add tests for multiple parameters
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 12:00:18 +02:00
Lukas Reschke a1ae5275f9
Move to dedicated MiddleWare
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 12:00:17 +02:00
Lukas Reschke 66835476b5
Add support for ratelimiting via annotations
This allows adding rate limiting via annotations to controllers, as one example:

```
@UserRateThrottle(limit=5, period=100)
@AnonRateThrottle(limit=1, period=100)
```

Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-13 12:00:16 +02:00
Lukas Reschke 01f3698175 Merge pull request #3966 from nextcloud/downstream-26570
Override config.php values through environment variables
2017-04-13 10:51:09 +02:00
Morris Jobke 7cb6038fca Merge pull request #3043 from nextcloud/issue-3038-no-logentry-on-email-login
Dont create a log entry on email login
2017-04-13 01:04:11 -05:00
Morris Jobke 1f962f9115
Update email template for lost password email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-12 15:19:53 -05:00
Roeland Jago Douma b3b24172e4 Merge pull request #4307 from nextcloud/sharing-emails
New emails for sharebymail
2017-04-12 21:23:11 +02:00
Morris Jobke ae4c2893a2
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-12 12:42:23 -05:00
Joas Schilling 1c8c62272c
Use instance name as alt-text
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-12 17:16:26 +02:00
Morris Jobke 050ce1d40b
Add addBodyButton to add a single button to email templates
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-12 17:16:26 +02:00
Roeland Jago Douma dccb8928a1 Merge pull request #4325 from nextcloud/downstream-27522
Optimize put - Dont try to fetch filecache for not existing filecache…
2017-04-12 16:04:03 +02:00
Björn Schießle b90e91144b Merge pull request #3614 from nextcloud/discover-federatedsharing-endpoints
Discover federatedsharing endpoints
2017-04-12 16:01:07 +02:00
Joas Schilling 30817fa319
Simplify the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-12 13:23:55 +02:00
Piotr M dc78f1251e
Optimize put - Dont try to fetch filecache for not existing filecache in encription 2017-04-12 12:54:20 +02:00
Lukas Reschke b5d31e4e65 Merge pull request #4309 from nextcloud/remove-unused-code
Removes unused code for link share emails
2017-04-12 10:15:59 +02:00
Morris Jobke be9a514dff
Allow to set text versions for the plain text email
* allows different texts for HTML and text version of the email

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 17:50:06 -05:00
Morris Jobke 8fa5141aaa
Removes unused code for link share emails
* now handled by sharebymail app
* see https://github.com/nextcloud/server/pull/657

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 17:32:48 -05:00
Lukas Reschke 280a075c9c
Adjust class references
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-11 17:35:59 +02:00
Lukas Reschke 3600dd4f52
Add IEMailTemplate to public OCP API
Also adds `\OCP\Mail\IMailer::createEMailTemplate` as helper so the functionality can easily be used within apps.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-11 16:35:46 +02:00
Bjoern Schiessle 449011dae7
remove discovery manager in favour of the OCSDiscoveryService
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-11 15:04:01 +02:00
Bjoern Schiessle 0dea31d48b
add tests for discovery service
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-11 15:04:01 +02:00
Lukas Reschke afb5d45705 Merge pull request #4256 from nextcloud/theming
Move OC_Defaults to OCP\Defaults
2017-04-11 14:39:46 +02:00
Morris Jobke a045f3c4d7 Merge pull request #4146 from nextcloud/unread-comments-folder
Allow getting the unread comment count for an entire folder at once
2017-04-10 13:21:39 -05:00
Robin Appelman a7c611039d
Dont use the permissions mask while scanning
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-10 15:19:21 +02:00
Joas Schilling bc217cdf87
Also send the new account data with the event
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-10 10:22:57 +02:00
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:01 -05:00
Morris Jobke ca9d25169d Merge pull request #4136 from nextcloud/expire-date-for-all-shares
Unified sharing options
2017-04-07 17:14:05 -05:00
Lukas Reschke 281ad406e8
Add support for theming
Add support for theming in generated emails and simplify API

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-07 12:03:47 -05:00
Lukas Reschke 1be75e8db8
Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-07 12:03:47 -05:00
Morris Jobke 0560e69913
New layout for welcome email
* thanks to @espina2 for make this nice design
* the button says "Set password" if the admin didn't specified a password

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-07 12:03:32 -05:00
Bjoern Schiessle 3323d01db1
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:43:59 +02:00
Roger Szabo 5fa218051b unit test adjustment
Signed-off-by: Roger Szabo <roger.szabo@web.de>
2017-04-07 18:06:50 +08:00
Joas Schilling 9f3d9b5b23
Don't force the use of Accept-Language anymore
This is not intended anymore, since it falls back to force english
when the header is not set. Also 0228bc6e66
makes clear that the order should be:

1. User setting
2. Accept language
3. Admin default

This is the case since the commit from above, unless via OCS and DAV.
Both forced to accept-language falling back to english.
By removing the force, it now also matches the w3 priority list:
https://www.w3.org/International/questions/qa-lang-priorities

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-07 11:10:04 +02:00
Joas Schilling 7ad791efb4
Dont create a log entry on email login
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-07 10:15:20 +02:00
Arthur Schiwon 7b3fdfeeaa
do login routine only once when done via LoginController
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-04-06 15:22:42 +02:00
Arthur Schiwon 2994cbc586
fix login controller tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-04-06 15:20:17 +02:00
Robin Appelman baec42e80a
Save the scope of an auth token in the session
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-05 17:58:33 +02:00
Roeland Jago Douma 6bdd3a167d Merge pull request #4123 from nextcloud/allow-password-reset-with-email
Allow to reset the password with the email as an input
2017-04-05 09:12:41 +02:00
Morris Jobke 95a21e2f2a
Check for boolean false and add tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-04 15:56:50 -05:00
Morris Jobke 0fcb37adcb
OC_ -> NC_
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-04 15:56:50 -05:00
Philipp Schaffrath 695a17804e
Override config.php values through ENV variables (#26570)
* added functionality to override config.php values with 'OC_' prefixed environment variables

* use getenv to read environment variables since apache does not set $_ENV variables, fixed test

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-04 15:56:50 -05:00
Lukas Reschke e0227cb458 Merge pull request #2095 from nextcloud/bruteforcesetttings
Introduce bruteforce settings
2017-04-04 11:57:43 +02:00
Roeland Jago Douma efb21a948e Merge pull request #4093 from nextcloud/endorse-password-protection
Endorse password protection
2017-04-04 11:04:21 +02:00
Roeland Jago Douma aee2d6318f
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-04 10:29:12 +02:00
Roeland Jago Douma 2a9192334e
Don't try to parse empty body if there is no body
Fixes #3890

If we do a put request without a body the current code still tries to
read the body. This patch makes sure that we do not try to read the body
if the content length is 0.

See RFC 2616 Section 4.3

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-04 08:22:33 +02:00
Bjoern Schiessle 5e7197e49f
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-03 10:58:25 +02:00
Morris Jobke ed00bab80b
Fixed layout of bruteforcesettings
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-02 21:19:30 +02:00
Roeland Jago Douma 4e0479f3a8
Update App Manager test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-02 21:13:51 +02:00
Roeland Jago Douma be674c19a5
Respect bruteforce settings in the Throttler
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-02 21:13:50 +02:00
Roeland Jago Douma dca555b7f3
Adds security section to the admin page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-02 21:13:09 +02:00
Roeland Jago Douma 6a40dce138
Initial commit of the bruteforcesettings app
This adds the bruteforce settings app that allows to configure (for now)
subnets that are to be ignored when doing brute force analysis. This can
for example be the LAN since we trust people from there.

* Add app
* Add php tests
* Add js tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-02 21:08:53 +02:00
Robin Appelman 48df99f2e0
fix quote helper test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 12:49:05 +02:00
Robin Appelman 2a4d9f71af
update FakeManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 12:48:34 +02:00
Robin Appelman 212d9fd277
Add test for getting unread comment count by folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 12:48:27 +02:00
Robin Appelman d4a7cfec7c
rename fun to func
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:15:06 +02:00
Robin Appelman fee818f493
Add tests for query builder (i)like
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:15:03 +02:00
Robin Appelman 4279b13270
Add function builder to the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:09:26 +02:00
Robin Appelman a65652fc1e
add support for escaping like parameters when using the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 11:09:22 +02:00
Morris Jobke 9813023aab
Fix gzip files for Safari
* Safari support gzip only if the filename does not
  end on .gz - so this renames them to .gzip

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-29 00:11:51 -06:00
Morris Jobke f9bc53146d
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-28 21:00:12 -06:00
Roeland Jago Douma 3a0ef65f33
Fix controller tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-28 23:42:20 +02:00
Roeland Jago Douma a40405531c
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-28 23:13:59 +02:00
Joas Schilling 4bae7ef96d
Allow to reset the password with the email as an input
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-28 21:17:37 +02:00
Morris Jobke f76a3b532d Merge pull request #4096 from nextcloud/touch-floor
round the mtime in touch
2017-03-27 09:46:10 -06:00
Robin Appelman 8de4209c3e
round the mtime in touch
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-27 17:07:48 +02:00
Joas Schilling e0b040d623
Allow multiple navigation links from info.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-26 21:15:25 +02:00
Lukas Reschke d81cdcbe88
Don't run JSCombiner when not installed
When the instance is not installed don't run the JSCombiner as the appdata folder does not yet exist.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-25 15:25:06 +01:00
Roeland Jago Douma 677e11b1a4
Tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-24 11:31:48 +01:00
Roeland Jago Douma 34632de102 Merge pull request #4025 from nextcloud/downstream-27292
Update karma
2017-03-24 08:44:42 +01:00
Morris Jobke 1397b84777 Merge pull request #3928 from nextcloud/downstream-17978
Adjust 4 byte MySQL code to upstream
2017-03-23 23:45:43 -06:00
Vincent Petry 46a32045d7
Update karma, use sinon from npm
Update karma library and use sinon JS library provided by
karma-jasmine-sinon instead of local file.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 23:35:41 -06:00
Roeland Jago Douma 35a21b4180
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-22 20:14:18 +01:00
Roeland Jago Douma e3925ba2a1
Cache SCSS dependency file in memcache
Since reading a file from disks can be costly. Lets store the dependency
json also in memcache.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-22 20:14:08 +01:00
Roeland Jago Douma 8b94fbe014
Add the AppContainer
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-22 11:24:16 +01:00
Joas Schilling 5695a4ec92
Don't do a recursive search
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-22 10:44:13 +01:00
Morris Jobke 1aef2f417b
Adjust tests as well
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:42 -06:00
Morris Jobke 713f684a8b
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes

Add config option to update charset of mysql to utf8mb4

* fully optional
* requires additional options set in the database

only disable unicode test on mysql

Fixing ctor call

Adding docker based unit test execution for mysql utf8mb4

Add mysqlmb4 test configuration to Jenkinsfile

fix collation on utf8mb4

Properly setup charset and collation in the doctrine connection

Allow files containing 4-byte chars in case the database supports it

During setup of a mysql database we try to detect if charset 'utf8mb4' can be used

Fix mysql settings

Add console command to migrate the charset

Set ROW_FORMAT before setting collation to mb4

Also select tables with wrong collation

Faster MySQL docker

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:12 -06:00
Joas Schilling 348d97dfd6 Merge pull request #3844 from nextcloud/unshare_event
Unshare event
2017-03-21 16:57:09 +01:00
Roeland Jago Douma 7e95837097 Merge pull request #3955 from nextcloud/downstream-27113
Can we get some faster phpunit execution?
2017-03-21 11:27:00 +01:00
Roeland Jago Douma 0fb5776133
Fix NODB tests etc
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-21 08:52:20 +01:00
Roeland Jago Douma 21641302a9
Add DI intergration tests
* Moved some interface definitions to Server.php (more to come)
* Build/Query only for existing classes in the AppContainer
* Build/Query only for classes of the App in the AppContainer
* Offload other stuff to the servercontainer

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-21 08:52:20 +01:00
Roeland Jago Douma 7cece61ff6
Extend DI tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-21 08:52:20 +01:00
Lukas Reschke 21cf1b22e9 Merge pull request #3530 from nextcloud/scss-variables
Implement scss variables
2017-03-20 19:49:53 +01:00
Thomas Müller 5bfce597a9
[CI] Can we get some faster phpunit execution? (#27113)
* Don't backup globals and static attributes

* Unset global variable to remove impact on followup tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 12:34:05 -06:00
Christoph Wurst 03a92eaf74 Merge pull request #3957 from nextcloud/downstream-27307
Follow up to #3949 (app exists on enable)
2017-03-20 18:10:05 +01:00
Roeland Jago Douma 1565177fb5
Revert "Add a magic wrapper to allow phpunit4 to run the code again "
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-20 14:25:43 +01:00
Julius Härtl a0f7d4b688
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-03-20 14:20:34 +01:00
Julius Härtl 29ec58f1b5
Add tests for SCSSCacher
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-03-20 14:12:35 +01:00
Julius Haertl 4fbf9a4feb
Add tests for SCSSCacher
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-03-20 12:49:08 +01:00
Joas Schilling 85a5c24934 Merge pull request #3939 from nextcloud/downstream-27159
Fix malformed logging in exception
2017-03-20 12:46:48 +01:00
Joas Schilling 257fbd85eb Merge pull request #3929 from nextcloud/downstream-27068
cache loadUser if not exists
2017-03-20 12:44:54 +01:00
Joas Schilling 35f6b8716e Merge pull request #3884 from nextcloud/downstream-26956
Skip null groups in group manager
2017-03-20 12:27:38 +01:00
Lukas Reschke a3739906f6 Merge pull request #3924 from nextcloud/preview_fixes
Do not generate the max preview twice
2017-03-20 11:45:51 +01:00
Joas Schilling 5795482282
createMock
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 11:14:14 +01:00
Lukas Reschke ab9e3525cc
Move error message to log entry
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-20 11:06:08 +01:00
Joas Schilling 3eb8313657
Fix the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 10:45:27 +01:00
Joas Schilling 591e75df5c
Don't use a generic exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 10:33:16 +01:00
Morris Jobke c969d8005e Merge pull request #3949 from nextcloud/downstream-27307
Check if app exists before enabling
2017-03-20 03:21:02 -06:00
Morris Jobke 50b0a4b181
Improve the test case
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 02:47:32 -06:00
Vincent Petry aacfef463c
Add tests for database user backend caching
Add comment, closeCursor in user DB query

Invalidate user in cache after successful creation

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 02:03:03 -06:00
noveens 5481a9b84a
checking if app exists in the FileStream now
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 00:38:29 -06:00
Jörn Friedrich Dreyer c96486cfae
test setTagGroups with empty groupids
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 22:01:46 -06:00
Morris Jobke edd55b0ea9
Use SystemConfig instead of AllConfig for DB stuff
* preparation for followup PRs to clean up the DB bootstrapping

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 15:53:49 -06:00
Morris Jobke c02527e414 Merge pull request #3927 from nextcloud/minor-fixes
Namespace and array syntax fixes
2017-03-19 15:49:38 -06:00
Morris Jobke d99ce3971b
Namespace and array syntax fixes
* minor fixes in preparation of a bigger DB and config PR

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 14:52:54 -06:00
Roeland Jago Douma a1f46db793
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-19 21:15:54 +01:00
Roeland Jago Douma ef789f8480 Merge pull request #3906 from nextcloud/shares-circles-2
Support Circles
2017-03-19 20:45:55 +01:00
Lukas Reschke 3adee0f18b Merge pull request #3898 from nextcloud/issue-3627-always-suggest-cli-url
Always suggest the overwrite.cli.url
2017-03-18 00:01:17 +01:00
Maxence Lange 69694012ab shares-circles
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
2017-03-17 18:48:33 -01:00
Joas Schilling 26eda9dd58 Merge pull request #3892 from nextcloud/downstream-27101
Redirect unlink to rmdir
2017-03-17 13:56:36 +01:00
Joas Schilling 80d2717e5c
Fix 5.6 duplicate class import
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 13:54:58 +01:00
Joas Schilling 75b81c3e01
Always suggest the overwrite.cli.url
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 13:40:58 +01:00
Joas Schilling c65848effe Merge pull request #3878 from nextcloud/downstream-26303
Fixed failing test which was ignoring a required (not null) column
2017-03-17 11:10:21 +01:00
Joas Schilling 70bd819dd2
Cleanup test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 10:59:53 +01:00
Joas Schilling 2f16f3ba44
Fix unit test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 10:39:08 +01:00
Joas Schilling ebabf81473
Clean up the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 10:35:22 +01:00
Joas Schilling bd97b7d130
Use DI
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 10:23:04 +01:00
Roeland Jago Douma 85601259fb
Add LegacyHooks
Use a helper class to listen to the eventDispatcher calls from the share
manager to emit the old \OC_Hooks

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-17 08:50:56 +01:00
Philipp Schaffrath 2ccf544ad7
Fixed failing test which was ignoring a required (not null) column (#26303)
* Fixed failing test which was ignoring a required (not null) column

* restored test to original, catching DriverException which also catches ConstraintViolationException

* catch ConstraintViolationException again

* removed unnecessary field from this test

* clobfield should be nullable

* clobfield now is nullable

* removed autoincrement since whenever this strategy is enabled, oracle would not throw constraint violation exceptions (needed for setValues), which mysql still does

* this field does not auto increment anymore

* mark integerfield as primary, since it is not getting marked as such through auto increment anymore,
integerfield default always has been 0 instead of null

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-17 00:09:07 -06:00
Vincent Petry 377fdf3860
Skip null groups in group manager (#26871) (#26956)
* Skip null groups in group manager (#26871)

* Skip null groups in group manager

* Also skip null groups in group manager's search function

* Add more group null checks in sharing code

* Add unit tests for null group safety in group manager

* Add unit tests for sharing code null group checks

* Added tests for null groups handling in sharing code

* Ignore moveShare optional repair in mount provider

In some cases, data is inconsistent in the oc_share table due to legacy
data. The mount provider might attempt to make it consistent but if the
target group does not exist any more it cannot work. In such case we
simply ignore the exception as it is not critical. Keeping the
exception would break user accounts as they would be unable to use
their filesystem.

* Adjust null group handing + tests

* Fix new group manager tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-17 00:07:03 -06:00
Vincent Petry 7256940524
Redirect unlink to rmdir (#27101)
Many API callers will call unlink even for directories and it can mess
up with some wrappers like the encryption wrapper

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-16 23:45:03 -06:00
Lukas Reschke 5f8f29508f
Adjust tests to include base-uri
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-16 18:12:10 +01:00
Lukas Reschke adfd1e63f6
Add base-uri to CSP policy
As per https://twitter.com/we1x/status/842032709543333890 a nice security hardening

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-16 15:16:20 +01:00
Roeland Jago Douma bb2ec51bbb
Fix unit tests of master
Follow up to #3802

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-16 12:46:02 +01:00
Morris Jobke f7cef9f702 Merge pull request #3772 from nextcloud/favorite-search
Allow searching for favorites
2017-03-13 00:55:12 -06:00
Lukas Reschke f74911b638 Merge pull request #3787 from nextcloud/ocs-cookie
dont require strict same site cookies for ocs requests
2017-03-10 18:14:38 +01:00
Robin Appelman 9a8cef965f
add test for skipping cookie checks for ocs
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-10 14:11:00 +01:00
Morris Jobke a5ba1f7803
Remove legacy class OC_Group and OC_User
* basically a straight replacement of the wrapped code at the calling code parts

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-09 17:35:09 -06:00
Björn Schießle c23c062c89 Merge pull request #3611 from nextcloud/announce-trsuted-server-endpoints
Announce trusted server endpoints
2017-03-09 14:39:18 +01:00
Bjoern Schiessle 43bca9f7f6
add and adjust unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-09 10:07:52 +01:00
Robin Appelman e61606a767
Allow searching for favorites
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-08 16:30:55 +01:00
Robin Appelman 2a8e922d67 Merge pull request #3360 from nextcloud/dav-search
Implement webdav SEARCH
2017-03-08 13:09:19 +01:00
Joas Schilling 342ee51dad
Make the test useful
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-03 12:01:38 +01:00
Morris Jobke 0b12eb0640
Execute UpdateLanguageCode only once
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-02 21:53:36 -06:00
Joas Schilling ba472f7ce0
Fix table name and add a test for more than 1 entries
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 09:11:47 +01:00
Morris Jobke 1bcd396679
Change language code for languages with only one translation
* then the language is not that specific and get also matched for fi
* fallback from fi_FI to fi is supported - the other way around not
* contains repair script
* contains tests for repair script
* fixes #869

Order results to make postgres happy

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-01 22:35:28 -06:00
Robin Appelman 709f64d396
add tests for filesearchbackend
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:40 +01:00
Robin Appelman e6a896f2f0
add tests for searchQuery
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:40 +01:00
Robin Appelman df2063ee7b
Implement webdav SEARCH
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:39 +01:00
Robin Appelman 706131b394
add icewind/searchdav
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-28 14:24:18 +01:00
Christoph Wurst e782f90d98
DefaultTokenProviderTest mocked/asserted the wrong method
It's 'getRemember' instead of 'getRememberMe', hence some warnings
were generated by phpunit.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-02-28 10:26:19 +01:00
Morris Jobke 8a7b8f966e Merge pull request #3489 from nextcloud/give-hint-about-opcache
Show info in admin settings about PHP opcache if disabled
2017-02-24 13:10:47 -06:00
Joas Schilling d0980bec73 Merge pull request #3287 from nextcloud/readd_appstoreenabled_switch
Add back appstoreenabled config switch
2017-02-24 10:07:25 +01:00
Joas Schilling b26568133f Merge pull request #3605 from nextcloud/single-user
Clean up single user mode
2017-02-24 08:52:26 +01:00
Morris Jobke f3bfacc976
Fix unit tests and improve appstore logic
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-24 08:34:14 +01:00
Morris Jobke ee52313e76 Merge pull request #3589 from nextcloud/remove-unneeded-repair-step
Remove unneeded repair steps
2017-02-23 15:57:21 -06:00
Morris Jobke cee8853658
Show info in admin settings about PHP opcache if disabled
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 23:45:48 -06:00
Morris Jobke 9533f4e5ed
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since
we heavily rely on WebDAV and OCS also in the web UI it's basically useless.
An admin only sees a broken interface and can't even change any settings nor
sees any files. Also sharing is not possible.

As this is at least the case since Nextcloud 9 and we haven't received any
reports for this it seems that this feature is not used at all so I removed it.

The encryption commands now rely on the well tested maintenance mode.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 23:02:31 -06:00
Morris Jobke 2bbf3b18d9
cleanup old and not needed repair steps to speed up the update
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 22:35:18 -06:00
Joas Schilling 1e281bc616
Use 90% JPEG quality for thumbnails and previews by default
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-02-22 14:53:15 +01:00
Morris Jobke 3382950297
add unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-15 18:07:21 -06:00
Morris Jobke 200a28255e
Always enable avatars
* we introduced this setting in the begining because our
  avatar support caused some performance issues, but we
  fixed them and should only provide one way how Nextcloud
  looks

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-13 17:53:33 -06:00
Robin Appelman bf88060a98 Merge pull request #3297 from nextcloud/cloud-id-resolve
Add a single public api for resolving a cloud id to a user and remote and back
2017-02-09 14:54:32 +01:00
Robin Appelman f6cd5200a2
clean cloud ids
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-09 13:31:06 +01:00
Lukas Reschke 4a5a3681d9 Merge pull request #3184 from nextcloud/issue-3165
Prevent migration from ownCloud 11 to Nextcloud 12
2017-02-09 13:29:08 +01:00
Joas Schilling ed4633a552 Merge pull request #3408 from nextcloud/nullstorage-free-space
return unknown free space from nullstorage
2017-02-09 13:17:54 +01:00
Joas Schilling ac841ee002 Merge pull request #3362 from nextcloud/fix/nc-token-cookie-name
oc_token should be nc_token
2017-02-09 10:07:59 +01:00
Morris Jobke 5e408aeb6c
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-08 20:39:34 -06:00
Robin Appelman ae66cf8d37
add tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-08 15:17:03 +01:00
Morris Jobke 942465c8b1
fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-03 11:52:01 -06:00
Christoph Wurst 5e728d0eda oc_token should be nc_token
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-02-02 21:56:44 +01:00
Morris Jobke 5bad417e57 Merge pull request #2044 from nextcloud/login-credential-store
Login credential store
2017-01-30 19:30:04 -06:00
Morris Jobke 8b95bd29ee Merge pull request #2822 from nextcloud/add-navigation-via-info.xml
Add navigation via info.xml (#26785)
2017-01-27 11:25:26 -06:00
Joas Schilling 27f8a832e4
Force to specify the name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-27 09:44:11 +01:00
Morris Jobke 98dc58356f Merge pull request #3284 from nextcloud/remove-avatar-fixup
remote now unneeded AvatarPermissions repair step
2017-01-26 20:14:24 -06:00
Morris Jobke e21170bd1a Merge pull request #3246 from nextcloud/fix-sqlite-dependency
Remove useless dependency on SQLite (non-PDO)
2017-01-26 15:41:11 -06:00
Robin Appelman c76fe2b4f5
remote now unneeded AvatarPermissions repair step
Avatars are now stored in appdata

Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-26 19:24:55 +01:00
Morris Jobke 4536ead454
Remove useless dependency on SQLite (non-PDO)
* we only require the PDO driver
* fixes #481

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-25 22:23:05 -06:00
Morris Jobke 3be746d660 Merge pull request #3208 from nextcloud/issue-3125-bring-user-management-endpoints-in-line
Error out when subadmin doesn't select any group
2017-01-25 22:16:25 -06:00
Björn Schießle ffe2543a57 Merge pull request #3232 from nextcloud/add-profile-data-to-provisioning-api
add data from the users profile to the provisioning api
2017-01-25 15:44:36 +01:00
Bjoern Schiessle 5086335643
unify endpoints form core and the the provisioning api
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-25 11:20:35 +01:00
Morris Jobke 95ab46e3d2 Merge pull request #3030 from nextcloud/filesapi-renamefailcase
Fix files node API failed rename/copy
2017-01-24 21:23:59 -06:00
Morris Jobke e09bba5e36 Merge pull request #3151 from nextcloud/navigation-icons
add icons to navigation of personal & admin settings
2017-01-24 10:56:31 -06:00
Magnus Walbeck eadc1ac637 Mimetype detection for hidden files
Signed-off-by: Magnus Walbeck <mw@mwalbeck.org>
2017-01-23 13:28:35 +01:00
Joas Schilling 18d7701d09
Prevent migration from ownCloud 11 to Nextcloud 12
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-23 12:04:46 +01:00
Joas Schilling 73856ac639
Error out when subadmin doesn't select any group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-23 11:58:58 +01:00
Joas Schilling a113f951d6
Adjust the tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-20 12:55:48 +01:00
Joas Schilling 80b800128d
Fix the manager tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-19 11:02:56 +01:00
Bjoern Schiessle 0271ae3b46
add some unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-18 15:25:16 +01:00
Joas Schilling aea1b72f54 Merge pull request #1594 from nextcloud/markdown-support-for-app-descriptions
Markdown support for app descriptions
2017-01-17 11:11:16 +01:00
Christoph Wurst 012708e1ba Merge pull request #3023 from nextcloud/issue-2915-filter-out-sensitive-appconfigs
Filter out sensitive appconfig values
2017-01-17 11:01:42 +01:00
Lukas Reschke 6a047a045a
Apply DOMPurify over HTML
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-13 18:58:18 +01:00
Morris Jobke 4d7dee5996
Fix JSUnit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-13 18:33:43 +01:00
Joas Schilling fcfb4205bc
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-13 18:33:43 +01:00
Joas Schilling 0f792fedef Merge pull request #3060 from nextcloud/cleanup-js-tests
Cleanup js tests
2017-01-13 14:47:06 +01:00
Christoph Wurst dd88e70dff fix image warnings
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-13 11:49:37 +01:00
Christoph Wurst c82befbc00 allow/fix loading of fonts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-13 11:46:06 +01:00
Morris Jobke 622101f2dd Merge pull request #2918 from nextcloud/encryption-recovery-improvements
create new encryption keys on password reset and backup the old one
2017-01-13 11:28:43 +01:00
Vincent Petry 269b652754
Add tests for move/copy hooks in Node API
Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-12 13:52:59 +01:00
Vincent Petry e667b28298
Fix files node API failed rename/copy
Whenever a rename or copy operation failed on the view, we must throw
an exception instead of just ignoring.

Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-12 13:52:59 +01:00
Joas Schilling 5dc6899d1a
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-12 10:49:22 +01:00
Christoph Wurst 140555b786
always allow remembered login
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 19:20:11 +01:00
Christoph Wurst 21d3fe5883
do not hard-require the token provider
The provider might need DB access and therefore depenedency
resolution fails on the setup page where we cannot inject
the db implementation.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 19:20:11 +01:00
Christoph Wurst 6f74ecd94a
use login hook credentials as fallback
If no session token is available, we can use the credentials provided
by the login hook.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 19:20:11 +01:00
Christoph Wurst a6dca9e7a0
add login credential store
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 19:20:09 +01:00
Vincent Petry eb5ea0e260
Refactor files node API for more code reuse
Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-11 14:53:42 +01:00
Christoph Wurst 243c9c0941
fix coding style and increase code coverage
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 11:01:54 +01:00
Cornelius Kölbel b8d41752ca
Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-11 11:01:54 +01:00
Roeland Jago Douma f515c6db4a Merge pull request #2745 from nextcloud/oc_26590
[downstream] Skip local shares in bkg scan and occ files:scan (#26590)
2017-01-11 08:16:12 +01:00
Roeland Jago Douma a90cbb0f09 Merge pull request #2951 from nextcloud/handle-nextcloud-log-type-gracefully
Handle log_type "nextcloud" more gracefully
2017-01-11 08:14:24 +01:00
Bjoern Schiessle fcda3a20f4
create new encryption keys on password reset and backup the old one
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-10 17:04:32 +01:00
Roeland Jago Douma 40239decb1 Merge pull request #3012 from nextcloud/fix-karma-image-warnings
show fewer warnings in karma test runs
2017-01-10 16:29:39 +01:00
Roeland Jago Douma 00b17c3af5
Only check for local shared storages
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-10 16:14:21 +01:00
Vincent Petry 706655ef20
Skip local shares in bkg scan and occ files:scan (#26590)
Local shares should only be scanned when doing it for the owner to
avoid repeatedly rescanning the same shared storage over and over again
for every recipient.
2017-01-10 16:11:45 +01:00
Roeland Jago Douma aee11009bd Merge pull request #3000 from nextcloud/cache-no-store
set 'no-store' cache header if we do not want FF to cache
2017-01-10 14:07:13 +01:00
Christoph Wurst e6a3e8bcd0
show fewer warnings in karma test runs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-10 13:50:22 +01:00
Morris Jobke 4dd2a1e679 Merge pull request #2943 from nextcloud/kill_old_preview_code
Cleanup old preview code
2017-01-10 13:50:14 +01:00
Roeland Jago Douma a5bf14ada3 Merge pull request #2955 from nextcloud/make-share-by-mail-work-without-linkshares
share by mail should continue to work, even if public links are disabled
2017-01-10 13:06:20 +01:00
Joas Schilling 7fa063ceca
Better fallback for unknown log types
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-10 12:59:13 +01:00
Christoph Wurst 45c6301772
fix controller test
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-10 11:54:45 +01:00
Roeland Jago Douma b847dfcee9 Merge pull request #2925 from nextcloud/remove-close-wrapper
replace close:// streamwrapper with CallBackWrapper
2017-01-10 10:21:10 +01:00
Christoph Wurst e3815b382d
fix data response test expected cache headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-10 10:13:08 +01:00
Christoph Wurst fe6416072d
set 'no-store' cache header if we do not want FF to cache
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-09 21:29:59 +01:00
Lukas Reschke 307d45e3bd Merge pull request #2987 from nextcloud/no-empty-bundle
dont write a certificate bundle if the shipped ca bundle is empty
2017-01-09 21:10:11 +01:00
Robin Appelman 817e974c5f
dont write a certificate bundle if the shipped ca bundle is empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-09 16:51:27 +01:00
Joas Schilling fee18d6c78 Merge pull request #2814 from nextcloud/appstore_etag_validation
Add ETag validation to appstore requests
2017-01-09 14:56:20 +01:00
Joas Schilling e7ff1ba548
Add tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-09 10:55:40 +01:00
Robin Appelman 5774d3e82c
replace close:// streamwrapper with CallBackWrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-06 15:33:32 +01:00
Roeland Jago Douma 73fcb69cad Merge pull request #2934 from nextcloud/quota-stream-non-global
remove the need to register the quota streamwrapper globally
2017-01-06 15:25:20 +01:00
Roeland Jago Douma ccab1168ce
Fix js tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-06 13:33:18 +01:00
Roeland Jago Douma 350b7ebc86
Adds CssControllerTests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-06 09:42:39 +01:00
Morris Jobke eeb5ea85f7 Merge pull request #2817 from nextcloud/fix-invalid-share-perms
Fix invalid share perms
2017-01-05 15:52:23 +01:00
Joas Schilling 64097aece9 Merge pull request #2946 from nextcloud/kill-apc
Kill APC because it requires PHP 5.4 or lower
2017-01-05 15:25:48 +01:00
Vincent Petry 7baa4ea1a4
Add repair step to fix file share permissions
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-05 14:30:22 +01:00
Roeland Jago Douma fc04779a26
Add ETag validation to appstore requests
* If the ETag if present store it
* If a stored ETag is present then pass it along (with the original
response) to get
* Add tests
* Added files to classmap

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-05 14:26:09 +01:00
Joas Schilling 7ba665b11d
Remove warning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-05 12:17:30 +01:00
Joas Schilling 6acfea61d0
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-05 12:17:30 +01:00
Joas Schilling bf043deba3
Kill APC because it requires PHP 5.4
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-05 10:58:34 +01:00
Roeland Jago Douma e723363053
Remove old preview code
* \OC\Preview is no more
* \Test\PreviewTests is no more
* PreviewHooks in base.php are gone

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-01-04 20:14:16 +01:00
Robin Appelman bca91f2216
remove static:// stream wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-04 15:57:02 +01:00
Robin Appelman 968de70bc5
remove the need to register the quota streamwrapper globally
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-04 15:15:47 +01:00
Bjoern Schiessle a45137bbca
also create mail share if public links are disabled
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-04 13:45:29 +01:00
Robin Appelman a75cfb601e Merge pull request #2923 from nextcloud/remove-fakedir-stream
remove no longer used fakedir stream wrapper
2017-01-03 20:22:16 +01:00
Robin Appelman 5b09565594
remove no longer used fakedir stream wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-03 17:06:03 +01:00
Morris Jobke 8e3f442fe2 Merge pull request #2872 from nextcloud/admin-settings-split-db
split db logic from settings manager and test them separately
2017-01-02 16:44:28 +01:00
Lukas Reschke 1b8aae837c Merge pull request #2912 from nextcloud/increase-coverage-response.php
Add 100% coverage for response.php
2017-01-02 16:01:47 +01:00
Lukas Reschke e2e4677501 Merge pull request #2911 from nextcloud/rebrand-to-nextcloud-server-crawler
Rebrand to "Nextcloud" and add 100% coverage
2017-01-02 15:32:09 +01:00
Lukas Reschke 746fc3d3bf
Add 100% coverage for response.php
While already at https://github.com/nextcloud/server/pull/2911 I thought I can as well finish that one as well...

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-02 15:16:35 +01:00
Lukas Reschke 5679f04cb1
Rebrand to "Nextcloud" and add 100% coverage
Noticed while debugging https://github.com/nextcloud/server/issues/2910

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-02 14:51:16 +01:00
Robin Appelman 3243a6032a
adjust test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-02 14:17:20 +01:00
Robin Appelman ac2542f0f0
add ci support for s3 object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-02 14:17:19 +01:00
Roeland Jago Douma 15efd3b38d Merge pull request #2892 from nextcloud/usercontroller_tests
Adds user controller tests
2016-12-30 14:58:52 +01:00
Roeland Jago Douma 31a3e9847f
Adds user controller tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-30 13:26:26 +01:00
Roeland Jago Douma b5a23c9754
User command enable/disable tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-30 13:17:41 +01:00
Roeland Jago Douma a7d9b7c876
Add Group Command tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-29 11:48:57 +01:00
Robin Appelman c4358ff9fd
split db logic from settings manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-28 18:59:24 +01:00
Robin Appelman 75747c5d2f Merge pull request #2854 from nextcloud/2fa-redirect-url
Set redirect_url on 2FA challenge page
2016-12-28 16:28:08 +01:00
Lukas Reschke f237c582ba Merge pull request #2845 from nextcloud/deleteuser-gethomeearly
Get user home folder before deletion
2016-12-27 13:45:28 +01:00
Christoph Wurst eff904473d
Set redirect_url on 2FA challenge page
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-12-23 20:53:26 +01:00
Lukas Reschke c5cc0d87a8 Merge pull request #2833 from nextcloud/downstream-26750
Introduce group display name support (#26750)
2016-12-23 13:57:59 +01:00
Vincent Petry 7ca6561469
Remove legacy home tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:50:31 +01:00
Vincent Petry 4744dce4df
Nuke the legacy storage fallback from orbit
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:49:46 +01:00
Vincent Petry 91cd57e55b
Get user home folder before deletion
After the deletion getHome() will fail because the user doesn't exist
any more, so we need to fetch that value earlier.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-23 12:42:31 +01:00
Arthur Schiwon 91a1e5fd9d
fix more tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-22 21:21:16 +01:00
Thomas Müller b62b82c2de
Fix reporting of risky tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-22 18:39:40 +01:00
Vincent Petry 453f3beffa
Adding group display name support 2016-12-22 18:34:45 +01:00
Morris Jobke bb8b647bd6 Merge pull request #2633 from nextcloud/2fa-activities
two-factor activities
2016-12-22 14:47:15 +01:00
Thomas Müller aa8755bd4b
Add navigation via info.xml (#26785)
* Read navigation information from info.xml

* Load files navigation elements from info.xml

* Add comment about ignoring the exception

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 12:34:41 +01:00
Björn Schießle 3453f4e97c Merge pull request #2761 from nextcloud/dont-resolve-shares-if-public-sharing-is-disabled
Don't resolve public share token if public sharing is disabled
2016-12-22 11:57:05 +01:00
Morris Jobke 998f235474 Merge pull request #2563 from nextcloud/fix-password-reset
fix password reset if encryption is enabled
2016-12-22 11:18:04 +01:00
Roeland Jago Douma 065f2fbcc6
Extend APCu test with int CAS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-21 21:06:41 +01:00
Lukas Reschke 091bf07385 Merge pull request #2724 from nextcloud/fix-23591
[downstream] Report failures for SignApp and SignCore
2016-12-21 13:03:13 +01:00
Lukas Reschke 0d138c8591 Merge pull request #2784 from nextcloud/2fa_command_tests
Add tests for 2FA commands
2016-12-21 12:32:36 +01:00
Morris Jobke 4c315082e1 Merge pull request #2769 from nextcloud/improve_user_user_coverage
Improve OC\User\User coverage
2016-12-20 16:50:44 +01:00
Roeland Jago Douma 09caadac05
Add tests for 2FA commands
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-20 16:36:58 +01:00
Christoph Wurst 88b7d033df fix 2fa activities tests
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-12-20 15:23:36 +01:00
Roeland Jago Douma 7b4265ab59
Improve OC\User\User coverage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-20 11:47:08 +01:00
Lukas Reschke 5983c68462
Don't resolve public share token if public sharing is disabled
Otherwise disabling sharing does prevent access to the view controllers but one can still access the shares using the public preview route or the public WebDAV endpoint.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-20 08:52:46 +01:00
Vincent Petry 252eddadd9
Remove obsolete RepairLegacyStorages repair step
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-19 17:45:46 +01:00
Lukas Reschke 3eb3e437c8
Add proper tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-19 15:35:31 +01:00
Victor Dubiniuk e536313451
Update tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-16 17:51:03 +01:00
Roeland Jago Douma 245501fb0c
Clear appstore cache on version upgrade
* Add version to cached json
* Compare version
* Updated calls
* Updated tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-15 22:04:03 +01:00
Roeland Jago Douma 67f65677a1 Merge pull request #2665 from nextcloud/remove-db-class-and-interface
Remove IDb interface which was deprecated for 3 years already
2016-12-14 19:05:41 +01:00
Joas Schilling bc3da3a8f5
Remove IDb interface which was deprecated for 3 years already
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-14 11:42:16 +01:00
Joas Schilling 77b6b7b23e
Use the mocked config version
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-14 10:45:27 +01:00
Joas Schilling a7aa7de6c2
Add a unit test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-13 13:54:18 +01:00
Lukas Reschke 32bf8ec826
Don't use cached informations for app version
When installing an app from the appstore the `\OC_App::getAppVersion` code is triggered twice:

- First when the downloader tries to compare the current version to the new version on the appstore to check if there is a newer version. This protects against downgrade attacks and is implemented in `\OC\Installer::downloadApp`.
- Second, when the app is actually installed the current version is written to the database. (`\OC\Installer::installApp`)

This fails however when the version is actually cached. Because in step 1 the cached version will be set to "0" and then be reused in the second step.

While this is probably not the cleanest version I assume this is an approach that is least invasive. Feedback and suggestions welcome :)

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-09 18:01:45 +01:00
Bjoern Schiessle 16bbd3fd7c
fix password reset if encryption is enabled
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-12-08 12:08:05 +01:00
Joas Schilling 924358ef96
Save the timezone on login again
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-08 10:45:24 +01:00
Morris Jobke 7aa510b2f0
Document updater channel & check for correct PHP version in updater
* see https://github.com/nextcloud/updater/issues/53

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-12-06 00:19:13 +01:00
Morris Jobke aac3024878 Merge pull request #2505 from nextcloud/sudo-mode-provisioning-api
Require sudo mode on the provisioning API
2016-12-05 22:29:29 +01:00
Roeland Jago Douma e368a745aa
Set last-login-check on basic auth
Else the last-login-check fails hard because the session value is not
set and thus defaults to 0.

* Started with tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-05 20:57:15 +01:00
Christoph Wurst 0478db6506 Merge pull request #2484 from nextcloud/fix-wrong-update-of-email-address
make sure that we only update the email address if it really changed
2016-12-05 17:14:23 +01:00
Morris Jobke 1253d1008a Merge pull request #2411 from nextcloud/fix-encryption-home-storage
check if the file should really be encrypted before we update the file cache
2016-12-05 15:38:12 +01:00
Bjoern Schiessle f25ad2e404
make sure that we only update the email address if it really changed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-12-02 18:07:08 +01:00
Robin Appelman 1a379b0fdc
update test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 18:04:21 +01:00
Lukas Reschke 2ca29f709b
Add tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-01 18:52:32 +01:00
Morris Jobke 01a62dee30
Language
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-30 15:20:04 +01:00
Morris Jobke 62ec31eb7b Merge pull request #2152 from nextcloud/preview_cleanupjob
Adds background job to cleanup all previews.
2016-11-30 10:39:21 +01:00
Bjoern Schiessle 0f8fe77b3a
check if the file should really be encrypted before we update the file cache
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-29 20:34:45 +01:00
Morris Jobke d86b29b42b Merge pull request #2066 from nextcloud/fix-redirect-double-encoding
do not double encode the redirect url
2016-11-29 17:21:43 +01:00
Lukas Reschke 3950ce9223 Merge pull request #2351 from nextcloud/remember-session-default
do not remember session tokens by default
2016-11-28 14:05:04 +01:00
Lukas Reschke 0cc771ce19 Merge pull request #2353 from nextcloud/renew-session-token-remember
copy remember-me value when renewing a session token
2016-11-28 14:04:13 +01:00
Christoph Wurst 6543182d13 fix parameter order
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-28 10:00:53 +01:00
Christoph Wurst ad610ae772 Merge pull request #2327 from nextcloud/exclude-pre-releases
Exclude pre-release versions as per SemVer
2016-11-28 09:55:24 +01:00
Christoph Wurst 2183a1f3e6 copy remember-me value when renewing a session token
On renew, a session token is duplicated. For some reason we did
not copy over the remember-me attribute value. Hence, the new token
was deleted too early in the background job and remember-me did
not work properly.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-27 14:19:57 +01:00
Christoph Wurst 9b808c4014 do not remember session tokens by default
We have to respect the value of the remember-me checkbox. Due to an error
in the source code the default value for the session token was to remember
it.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-27 14:03:28 +01:00
Morris Jobke 64fb0fb3dd Merge pull request #2276 from nextcloud/update-email-address
Update email address
2016-11-25 11:40:20 +01:00
Lukas Reschke 29402e2c0a
Exclude pre-release versions as per SemVer
As SemVer can be used apps could define a release like "10.0.0-alpha". This is something that we don't support at the moment in the server and we should filter all prereleases.

Ref https://github.com/nextcloud/server/pull/2307#issuecomment-262911588

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-25 11:32:46 +01:00
Bjoern Schiessle 0de685c562
bring back setEmailAddress for the user management
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-25 10:26:48 +01:00
Bjoern Schiessle 3fc75073b8
update accounts table if email address or display name changes from outside
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-25 10:26:47 +01:00
Roeland Jago Douma 72f9920a58
Add Identityproof tests
* Add tests for Key
* Add tests for Manager
* Add tests for Signer
* Removed URLGenerator from Signer

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-24 21:50:19 +01:00
Lukas Reschke 6a4c0cf237
Loop for newest version in appstore response
The current implementation when fetching apps from the appstore is to assume that the first element is the newest version, this is now always applicable and leads to the fact that for some apps (e.g. nextant) the newest version is not delivered. This can be easily tested by comparing the version of the downloaded Nextant version.

This change will loop over all releases delivered by the appstore and chooses the newest compatible one. While not the cleanest solution, it does its job.

Most of the code are actually unit tests. Whereas I have copied the whole original response from the appstore and also have performed the transformation. So that's why the diff looks so huge.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-24 14:29:57 +01:00
Bjoern Schiessle 546989959c
update email address correctly
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-23 20:19:31 +01:00
Lukas Reschke a05b8b7953
Harden cookies more appropriate
This adds the __Host- prefix to the same-site cookies. This is a small but yet nice security hardening.

See https://googlechrome.github.io/samples/cookie-prefixes/ for the implications.

Fixes https://github.com/nextcloud/server/issues/1412

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-23 12:53:44 +01:00
Roeland Jago Douma df215625f1 Merge pull request #1972 from nextcloud/invalid-files-from-scanner
Make sure we don't scan files that can not be accessed
2016-11-22 12:55:54 +01:00
Robin Appelman cd24010fa4 Merge pull request #2214 from nextcloud/remove-logging
remove old logging section
2016-11-21 17:17:02 +01:00
Robin Appelman 0048b3aa2e
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-21 15:59:08 +01:00
Lukas Reschke d001dbd259
Adjust unit tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-21 11:30:03 +01:00
Lukas Reschke 8bf4111368
Fix changing display names for subadmins
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-21 11:30:00 +01:00
Lukas Reschke fb91bf6a5b
Add a signer class for signing
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-21 11:30:00 +01:00
Bjoern Schiessle a32d6e481f
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:30:00 +01:00
Bjoern Schiessle b23a4ca96b
push public user data to the lookup server
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:29:59 +01:00
Bjoern Schiessle c5e61947a9
remove old test class
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:29:59 +01:00
Bjoern Schiessle 08e6541a88
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:29:58 +01:00
Björn Schießle de1f3f05fd
allow to change display names in the user settings again
keep display name and email address in sync with the accounts table

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-21 11:29:54 +01:00
Björn Schießle 40b99734d3
introduce accounts table and keep it up-to-date with the data added to the personal settings
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-21 11:29:41 +01:00
Joas Schilling 558f169671
Move the validation into one place only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-21 09:23:37 +01:00
Joas Schilling 4652d203e3
Make sure we don't scan files that can not be accessed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-21 09:23:32 +01:00
Roeland Jago Douma 78a318d388
Add test if repair step is already done
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-19 20:26:53 +01:00
Roeland Jago Douma ccb05dbb17
Adds background job to cleanup all previews.
* A repair step that inserts a background job for each user
* Each background job will delete for 15 seconds if it takes longer we
reschedule. This is done so instances that don't use the system cron
won't time out.
* Added tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-19 20:14:44 +01:00
Lukas Reschke 8ec2e34576 Merge pull request #1602 from nextcloud/ignore-mod-env
Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
2016-11-18 21:42:56 +01:00
Morris Jobke 46768e71d9 Merge pull request #2076 from nextcloud/log_preview_access
Dispatch event on preview request
2016-11-18 20:45:29 +01:00
Morris Jobke 332eaec4c0 Merge pull request #1447 from nextcloud/password-confirmation-for-some-actions
Password confirmation for some actions
2016-11-18 15:42:30 +01:00
Robin Appelman 8b9ad46ba3 Merge pull request #768 from nextcloud/s3-objectstore
Add S3 objectstore backend
2016-11-18 14:55:07 +01:00
Joas Schilling b2d9c20aac
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-18 12:10:51 +01:00
Morris Jobke d3900fc0d5 Merge pull request #2177 from nextcloud/appmanager-getapppath
Expose getAppPath to public API
2016-11-17 22:39:34 +01:00
Julius Haertl caacb6c261
Expose getAppPath to public API
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-17 19:24:24 +01:00
Morris Jobke bba32cf4b7 Merge pull request #2163 from nextcloud/app-password-scope-warngings
fix warnings when updating app password
2016-11-17 17:52:23 +01:00
Felix Epp 1614b310ef Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
Added the system config which sets all conditions to true that query the
FrontControllerActive mod_env variable.

Signed-off-by: Felix A. Epp <work@felixepp.de>
2016-11-16 22:28:49 +01:00
Roeland Jago Douma 74c68d8761
Add OCSControllerTests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 19:49:51 +01:00
Robin Appelman d2dee32756
fix warnings when updating app password
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 19:14:36 +01:00
Robin Appelman 4ac5fdcf11
add tests for FileInfo::isMounted
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:37 +01:00
Robin Appelman e4d1cf0f6d
add tests for http/output
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:37 +01:00
Robin Appelman eefd059716
add amazon s3 objectstore backend
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman 64e896cc0d
split testing of objectstoragestorage and objectstore implementations
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:30:36 +01:00
Robin Appelman e633f2f8df
add test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:33 +01:00
Robin Appelman e77432783b
Add test for setting up fake fs
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:32 +01:00
Roeland Jago Douma 311531ecce
Adds tests for the AuthSettingsController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 15:24:31 +01:00
Roeland Jago Douma 59d6003f89
Adds NullCache ans NullStorage tests for Lockdown
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 15:24:31 +01:00
Roeland Jago Douma e5bc80b31d
Adds TokenProvider and Mapper tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 15:24:31 +01:00
Robin Appelman 91851c37be
add tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:30 +01:00
Robin Appelman 4c3d18a9fc
explicit types
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:29 +01:00
Robin Appelman a4ea20a259
cast to int
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:29 +01:00
Robin Appelman bb65d3b03d
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-16 15:24:29 +01:00
Joas Schilling 8725302307
Fix InfoParser empty tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 09:25:45 +01:00
Joas Schilling b8958ee937
Fix activity manager tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 09:25:45 +01:00
Roeland Jago Douma 28babd319b Merge pull request #2137 from nextcloud/make-sure-tests-run-on-phpunit-4-again
Add a magic wrapper to allow phpunit4 to run the code again
2016-11-15 21:48:55 +01:00
Lukas Reschke b775d935f2
Endpoint is now 11.0.0
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-15 15:10:17 +01:00
Lukas Reschke 5fd428413b
Adjust previous fallbacks
11.0 is 11 and not 9.2 anymore

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-15 15:07:58 +01:00
Joas Schilling e76ef9aaa8
Add a magic wrapper from hell to allow phpunit4 to run the code again
Remove this once phpunit 5 is the lowest supported version, by reverting:
https://github.com/nextcloud/server/pull/2137

Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-15 14:49:14 +01:00
Roeland Jago Douma b7e13b43fb Merge pull request #2114 from nextcloud/downstream-26498
make object prefix configurable
2016-11-14 17:07:00 +01:00
Jörn Friedrich Dreyer 4a9361905d
make object prefix configurable 2016-11-14 15:10:56 +01:00
Thomas Müller 506ccdbd8d
Introduce an event for first time login based on the last login time stamp
Use firstLogin event to trigger creation of default calendar and default address book

Delay login of admin user after setup so that firstLogin event can properly be processed for the admin

Fixing tests ...

Skeleton files are not copied over -> only 3 cache entries are remaining

Use updateLastLoginTimestamp to properly setup lastLogin value for a test user
2016-11-14 14:50:10 +01:00
Morris Jobke 16a110e803 Merge pull request #2067 from nextcloud/fileinfo-lazy-substorages
only query substorages to calculate the final mtime/size/etag when we need it
2016-11-14 11:39:02 +01:00
Lukas Reschke 7cb0df28e2
Prevent downgrade attacks for apps
We should verify the app versions when installing a new update, otherwise this could result in downgrade attacks when an attacker just copies the old signature.

Plus it prevents the case that in case of a bug in the appstore actually an older version gets installed.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-11 18:53:26 +01:00
Roeland Jago Douma 99ada40df4
Dispatch event on preview request
Fixes: #73

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-10 14:28:09 +01:00
Robin Appelman cbcdf69dc2
only query substorages to calculate the final mtime/size/etag lazily
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-10 13:59:22 +01:00
Christoph Wurst 0ebffa4a5f do not double encode the redirect url
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-09 16:14:46 +01:00
Morris Jobke eadccc239a Merge pull request #2052 from nextcloud/ros-definitions-as-php-class
Use a php class for the definitions to avoid loading problems
2016-11-09 13:53:54 +01:00
Lukas Reschke 9305094b8b
Add test and adjust PHP function arguments
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-09 10:49:57 +01:00
Joas Schilling 92e5fb4053
Add tests for validity of the definitions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-09 10:08:29 +01:00
Joas Schilling 706b5c3fb6
Use a php class for the definitions to avoid loading problems
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-09 08:52:07 +01:00
Roeland Jago Douma b6562cb386
Generate js codecov coverage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-09 08:03:29 +01:00
Morris Jobke 05cf1dab4c Merge pull request #2053 from nextcloud/make-sure-we-can-backup-the-command-bus
Make sure the database is not replaced while we make a backup of the …
2016-11-08 20:37:22 +01:00
Joas Schilling 4393e8003b
Make sure the database is not replaced while we make a backup of the service
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-08 16:32:41 +01:00
Christoph Wurst 9e5e120ef9
refactor share permission logic into own method to reuse it for the share tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-07 14:58:45 +01:00
Roeland Jago Douma 95a8964cc8
Add settings PersonalController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-06 14:05:49 +01:00
Roeland Jago Douma 04ece69a33
Cleanup OC_Group usage a bit
This is deprecated internal stuff. Should not be used anymore.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 20:55:47 +01:00
Morris Jobke ac61f64190 Merge pull request #1109 from nextcloud/add-more-secrets-to-password-reset-link
Use mail for encrypting the password reset token as well
2016-11-03 22:11:43 +01:00
Lukas Reschke c0bbae28f0 Merge pull request #1741 from nextcloud/new_preview
Improve previews
2016-11-03 21:07:16 +01:00
Roeland Jago Douma dca9184a12
Fix tests
* Tests fixed and controller coverage to 100%

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 19:08:56 +01:00
Lukas Reschke 6d686c213b
[WIP] Use mail for encrypting the password reset token as well 2016-11-03 14:27:26 +01:00
Roeland Jago Douma 7ba7949dc1 Merge pull request #1994 from nextcloud/proper-cron-hints
Show a hint for system based cron user name
2016-11-03 14:11:37 +01:00
Roeland Jago Douma 9e6b26dcd0
Add cache 1 day cache to preview endpoint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Roeland Jago Douma 55af6b45f7
More tests
* PreviewController test
* PublicPreview test
* Versions Preview test
* Trash Preview test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Roeland Jago Douma 87855aa97b
Added genertor helper & tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Roeland Jago Douma 2164085f22
Fix urlgenerator test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Lukas Reschke b33ceb6fdd Merge pull request #1915 from nextcloud/downstream-26398
Add using casing check/fix for initMountPoints
2016-11-03 12:14:28 +01:00
Morris Jobke 0741346385
Show a hint for system based cron user name
* makes it easier to setup cron job
* gives hints for PHP documentation
* disables the cron setting if requirements not met
* fixes #1989

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-03 10:38:00 +01:00
Lukas Reschke 6920e609c0
Adjust tests and DI for Share.php
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 23:26:49 +01:00
Lukas Reschke 68cebef64c
DI for root.php
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 23:16:51 +01:00
Morris Jobke 39573e602d Merge pull request #1978 from nextcloud/remove-send-mail-option
Remove send mail option
2016-11-02 22:36:05 +01:00
Morris Jobke 178d7f5bfa Merge pull request #1988 from nextcloud/silly-but-effective-test
Add test for "languageCodes.php"
2016-11-02 22:30:52 +01:00
Vincent Petry 889e0a574b
Fix mock warning in some FS tests (#26464) 2016-11-02 22:21:47 +01:00
Vincent Petry f737426eca
Add using casing check/fix for initMountPoints 2016-11-02 22:21:46 +01:00
Lukas Reschke c1feae1684 Merge pull request #1981 from nextcloud/multibucket-num-buckets
Allow setting a maximun number of buckets for multibucket
2016-11-02 22:05:57 +01:00
Lukas Reschke 8d4bda7de6
Add test for "languageCodesTest.php"
Arguably not the most awesome test but increases coverage and is an easy gain.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 21:53:54 +01:00
Robin Appelman 049bcae29e
Allow setting a maximun number of buckets for multibucket
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-02 21:31:24 +01:00
Lukas Reschke a8b7df9cc1
Add tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 21:10:51 +01:00
Joas Schilling 2c4035e806
Inject config and logger
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-02 20:30:37 +01:00
Morris Jobke e6b52ef4cd Merge pull request #1347 from nextcloud/bring-back-remember-me
fix remember me login
2016-11-02 18:32:38 +01:00
Bjoern Schiessle f556c58c22
remove 'send mail notification' option from sharing, replaced by send-by-mail feature
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-02 18:30:38 +01:00
Michael Grosser e81d04cd8d Merge pull request #1940 from nextcloud/new-appstore
Use new appstore API
2016-11-02 17:00:24 +00:00
Lukas Reschke 9d6e01ef40
Add missing tests and fix PHPDoc
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 13:39:17 +01:00
Christoph Wurst 6f86e468d4
inject ISecureRandom into user session and use injected config too
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-02 13:39:16 +01:00
Christoph Wurst d907666232
bring back remember-me
* try to reuse the old session token for remember me login
* decrypt/encrypt token password and set the session id accordingly
* create remember-me cookies only if checkbox is checked and 2fa solved
* adjust db token cleanup to store remembered tokens longer
* adjust unit tests

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-02 13:39:16 +01:00
Roeland Jago Douma 370123b8b0 Merge pull request #1966 from nextcloud/fix-csrf-token-generation
Fix CSRF token generation / validation
2016-11-02 12:09:30 +01:00
Leon Klingele e5d78a3523
Fix CSRF token generation / validation
Operate on raw bytes instead of base64-encoded strings.
Issue was introduced in a977465

Signed-off-by: Leon Klingele <git@leonklingele.de>
2016-11-02 10:38:05 +01:00
Bjoern Schiessle 318160647a
add method to check if a share provider for a given type is loaded
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-01 19:54:39 +01:00
Roeland Jago Douma 7e2159e9bb
Add defaultShareProvider & federatedshareprovider tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-01 13:52:37 +01:00
Roeland Jago Douma d2110ebb0b
Add Manager unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-01 12:35:50 +01:00
Lukas Reschke 0eeef26a8e
Add tests for installer method
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 19:39:35 +01:00
Lukas Reschke a68595742b
Proxy images through usercontent.apps.nextcloud.com
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:47 +01:00
Lukas Reschke 8acb54aa0b
Add update support
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:47 +01:00
Lukas Reschke 89fc4358ba
Use substr and explode instead of a regex
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:45 +01:00
Lukas Reschke 8d83e239f3
Fix tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:45 +01:00
Lukas Reschke 32cf661215
Use new appstore API
This change introduces the new appstore API in Nextcloud.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:44 +01:00
Robin Appelman 3692769b0a
Add getShareTypesInFolder to optimize folder listening
Signed-off-by: Robin Appelman <icewind@owncloud.com>
2016-10-31 15:55:40 +01:00
Roeland Jago Douma 83e7cfd13a
Fix more tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-28 22:16:28 +02:00
Roeland Jago Douma f722640a32
Proper DI of config
* Fixed comments

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-28 10:13:35 +02:00
Jörn Friedrich Dreyer f8352fcb8d
introduce callForSeenUsers and countSeenUsers (#26361)
* introduce callForSeenUsers and countSeenUsers

* add tests

* oracle should support not null on clob

* since 9.2.0
2016-10-28 08:44:05 +02:00
Morris Jobke d4969abc9d Merge pull request #1800 from nextcloud/nextcloud-rich-object-strings
Nextcloud rich object strings
2016-10-27 15:30:58 +02:00
Roeland Jago Douma b7046d390f
Remove internal share mail function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-26 20:52:41 +02:00
Roeland Jago Douma b98dfaccd9 Merge pull request #1920 from nextcloud/legacy-pages-should-also-receive-the-nonce
Add nonce also to legacy CSP
2016-10-26 16:41:34 +02:00
Morris Jobke cde7f535bd Merge pull request #1738 from nextcloud/comments-provide-displaynames-with-mentions
comment mentions: show displayname not uid
2016-10-26 14:02:49 +02:00
Joas Schilling c20ab0049f
Identify Chromium as Chrome
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-26 12:07:10 +02:00
Roeland Jago Douma e351ba56f1
Move browserSupportsCspV3 to CSPNonceManager
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-25 22:03:10 +02:00
Morris Jobke 097a9ec8b0 Merge pull request #1878 from nextcloud/downstream-25936
Adjust unit tests to upstream
2016-10-25 17:59:01 +02:00
Morris Jobke 89574367bc Merge pull request #1871 from nextcloud/use-csp-nonces
Use CSP nonces
2016-10-25 14:46:00 +02:00
Lukas Reschke 740ff9108b Merge pull request #1884 from nextcloud/downstream-26292
Fix logClientIn for non-existing users (#26292)
2016-10-25 11:24:13 +02:00
Joas Schilling 890f752a6b Merge pull request #1452 from nextcloud/appconfig-endpoint
Appconfig endpoint
2016-10-25 10:57:48 +02:00
Roeland Jago Douma 593d52fe91
Fix and cleanup SessionTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-25 09:34:27 +02:00
Vincent Petry 6d1e858aa4
Fix logClientIn for non-existing users (#26292)
The check for two factor enforcement would return true for non-existing
users. This fix makes it return false in order to be able to perform
the regular login which will then fail and return false.

This prevents throwing PasswordLoginForbidden for non-existing users.
2016-10-25 09:34:27 +02:00
Lukas Reschke 38b3ac8213
Add ContentSecurityPolicyNonceManager
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-24 16:35:31 +02:00
Thomas Müller 03ec052b4e
App dependencies are now analysed on app enable as well - not only on app install. 2016-10-24 15:59:46 +02:00
Thomas Müller 0c637c8d73
[9.2] Add missing unit tests (#25936)
* Adjust unit test execution after folder rename

* Adjust login controller tests to match current behavior

* Fix broken unit tests
2016-10-24 14:25:52 +02:00
Lukas Reschke 9e6634814e
Add support for CSP nonces
CSP nonces are a feature available with CSP v2. Basically instead of saying "JS resources from the same domain are ok to be served" we now say "Ressources from everywhere are allowed as long as they add a `nonce` attribute to the script tag with the right nonce.

At the moment the nonce is basically just a `<?php p(base64_encode($_['requesttoken'])) ?>`, we have to decode the requesttoken since `:` is not an allowed value in the nonce. So if somebody does on their own include JS files (instead of using the `addScript` public API, they now must also include that attribute.)

IE does currently not implement CSP v2, thus there is a whitelist included that delivers the new CSP v2 policy to newer browsers. Check http://caniuse.com/#feat=contentsecuritypolicy2 for the current browser support list. An alternative approach would be to just add `'unsafe-inline'` as well as `'unsafe-inline'` is ignored by CSPv2 when a nonce is set. But this would make this security feature unusable at all in IE. Not worth it at the moment IMO.

Implementing this offers the following advantages:

1. **Security:** As we host resources from the same domain by design we don't have to worry about 'self' anymore being in the whitelist
2. **Performance:** We can move oc.js again to inline JS. This makes the loading way quicker as we don't have to load on every load of a new web page a blocking dynamically non-cached JavaScript file.

If you want to toy with CSP see also https://csp-evaluator.withgoogle.com/

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-24 12:27:50 +02:00
Roeland Jago Douma ab91fa2660 Merge pull request #1820 from nextcloud/4byte-filenames
Allow 4byte unicode filenames on supported platforms
2016-10-24 10:38:25 +02:00
Roeland Jago Douma 7998689bc9
Added method to DB and fix test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 09:45:04 +02:00
Roeland Jago Douma eaf152efeb
Fix DateTime comparisson
Datetime now returns microseconds. But if the database doesn't store
those comparing them for equality most likely fails.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-21 13:43:39 +02:00
Joas Schilling 0b1fb180a5
Make AppConfig part of the public API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-21 09:09:23 +02:00
Morris Jobke 2799b0a821 Merge pull request #1835 from nextcloud/downstream-24948
Move OC\Files\Storage\Shared to the right namespace
2016-10-20 23:48:15 +02:00
Vincent Petry 9e9fef46d9
Get rid of very old oc:// stream wrapper (#26381) 2016-10-20 20:46:30 +02:00
Morris Jobke c7ba73e6f4 Merge pull request #1824 from nextcloud/downstream-26423
Ensure $commands being an array
2016-10-20 20:43:26 +02:00
Vincent Petry fca8bd44ab
Fix shared storage namespace in DecryptAll class 2016-10-20 20:36:50 +02:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00
Thomas Müller ef842ef20a
Ensure $commands being an array - fixes #26073 2016-10-20 15:40:27 +02:00
Morris Jobke 7836a8d8c7
use short array syntax
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-20 15:40:22 +02:00
Joas Schilling 9f2d9895a5
Restore all services when a tests failed/finished for better testcase isolation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-20 15:19:41 +02:00
Joas Schilling 122edcd0c1
Make sure all tests use the TestCase method to overwrite services
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-20 15:19:41 +02:00
Arthur Schiwon e5ce61b174
add missing methods to test fake manager
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-20 14:32:32 +02:00
Joas Schilling b35d2fd8f2
Allow rich object subjects for Notifications
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-20 12:14:59 +02:00
Joas Schilling 2098648850
Add Rich Object Definitions and a validator
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-20 12:14:51 +02:00
Arthur Schiwon 5d98ab83e9
resolve displayname via manager and registerable resolvers
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Arthur Schiwon fea3e20a80
move mention extraction to (I)Comment and report mentions via DAV
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:33:55 +02:00
Joas Schilling 303e073724
Do not skip when mysql uses utf8mb4
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-19 00:15:01 +02:00
Joas Schilling 43b7b143f4
Fix test of repair step
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-19 00:15:01 +02:00
Joas Schilling 17a2723948
Fix the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-19 00:15:01 +02:00
Thomas Müller 9c3f066dab
Adding docker based unit test execution for mysql utf8mb4 2016-10-19 00:15:01 +02:00
Morris Jobke 296a3274cf
only disable unicode test on mysql 2016-10-19 00:15:01 +02:00
Morris Jobke 972e560e72
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes
2016-10-19 00:15:01 +02:00
Joas Schilling 656e3f7a24
Check the mimetype before reading the content and catch exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-18 16:22:20 +02:00
Morris Jobke 96f8f209b9 Merge pull request #1449 from nextcloud/comments-user-mention
Notifications for simple @-mentioning in comments
2016-10-17 09:30:47 +02:00
Lukas Reschke 62e19dfa80 Merge pull request #1441 from nextcloud/getby-id-less-queries
optimize Folder::getById to use less queries
2016-10-14 15:18:23 +02:00
Christoph Wurst 53eb0f7f42 Merge pull request #1037 from nextcloud/no-double-token-update
dont update the auth token twice
2016-10-14 14:53:17 +02:00
Arthur Schiwon 1bcd2ca8e3
emit pre-update event for comments
* notifications can be cleaned up, no polluted DB
* updating comments will re-notify users or remove notifications, depending on the message

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-12 18:06:22 +02:00
Robin Appelman 0d842e0550
optimize Folder::getById to use less queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:28 +02:00
Roeland Jago Douma 7eba1d806b
Add tests for commands in info.xml
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-11 19:48:31 +02:00
Thomas Müller c5ca71ee82
[9.2] Register commands in info.xml (#26248)
* Use DI to load console commands from the apps - class name to be defined in the info.xml

* Load commands from info.xml

* Fix unit test

* Allow Di magic for IMountManager

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-11 19:48:26 +02:00
Thomas Müller b1641cc113
Fix QueryBuilderTests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-11 12:30:46 +02:00
Robin Appelman 90db361827
Add test to ensure token times are updated
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-11 11:06:24 +02:00
Robin Appelman 25ed6714c7
dont update the auth token twice
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-11 11:05:25 +02:00
Roeland Jago Douma 3c173378e8
Fix typehint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-10 22:13:51 +02:00
Thomas Müller 2806a4bca7
Cleanup test case
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-10 22:13:47 +02:00
Christoph Wurst a0cb809342 Merge pull request #1660 from nextcloud/add-notification-icon-to-api
Add an icon to the notification API
2016-10-10 09:32:34 +02:00
Morris Jobke 195fc041da Merge pull request #1663 from nextcloud/dont-reparse-info-xml
Dont reparse info xml + cache AppInfo XML
2016-10-10 09:22:43 +02:00
Christoph Wurst ce9e33bd3c Merge pull request #1656 from nextcloud/appinfo-check-class-existance
Make sure all the jobs, command, provides and migrations are valid
2016-10-10 09:04:27 +02:00
Lukas Reschke 0245dd7221
Simplify isSubDirectory check
Shaves off another 9ms per request as can be seen at https://blackfire.io/profiles/compare/dd54cef3-e58d-4a22-b8f4-c7c4b70697be/graph

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-07 21:56:43 +02:00
Lukas Reschke 0c2b17c80f
Cache AppInfo in Memory Cache if configured
This saves around 20ms on a bare-bone instance, on bigger ones more (depending on the number of installed apps).

See https://blackfire.io/profiles/compare/fc326ad3-100d-49b8-8ea9-8343240f53f3/graph

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-07 21:29:23 +02:00
Thomas Müller 67d3574bdf
Don't parse info.xml but reuse already cached app infos - fixes #25603 (#25968)
* Don't parse info.xml but reuse already cached app infos - fixes #25603

* Use === in InfoParser. Fixes test

* InfoParser should not depend on UrlGenerator - fixes issue with session being closed too early
2016-10-07 20:58:22 +02:00
Arthur Schiwon e1073cf442
Notificacations for simple @-mentioning in comments
(WIP) notify user when mentioned in comments

Fix doc, and create absolute URL for as notification link.

PSR-4 compatibility changes

also move notification creation to comments app

Do not notify yourself

unit test for controller and application

smaller fixes

- translatable app name
- remove doubles in mention array
- micro perf optimization
- display name: special label for deleted users, keep user id for users that could not be fetched from userManager

Comment Notification-Listener Unit Test

fix email adresses

remove notification when triggering comment was deleted

add and adjust tests

add missing @license tags

simplify NotificationsController registration

appinfo simplification, php docs

make string easier to translate

adjust test

replace dispatcher-based listeners with a registration method and interface

safer to not pass optional data parameter to setSubject for marking as processed. ID and mention suffices

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

update comment

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-07 17:11:19 +02:00
Joas Schilling c77933ca22
Add an icon to the notification API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-07 17:00:24 +02:00
Joas Schilling c02a50a432
Make sure all the jobs, command, provides and migrations are valid
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-07 14:25:18 +02:00
Morris Jobke c4b2639585 Merge pull request #1514 from nextcloud/integration-tests-orphaned-shares
Integration tests orphaned shares + Prefilter inaccessible shares
2016-10-06 22:58:56 +02:00
Joas Schilling a0b34dfd2f Merge pull request #1629 from nextcloud/cleanup-settings-application
Cleanup settings Application class
2016-10-06 16:57:39 +02:00
Joas Schilling ed30b1f645
Use our base class everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:11:04 +02:00
Joas Schilling b130a0ee09
phpunit min version is 4.8
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:07:32 +02:00
Joas Schilling ccc29a3da2
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:05:52 +02:00
Vincent Petry 626daabb56
Prefilter inaccessible shares in DefaultShareProvider::getSharedWith()
The DefaultShareProvider now does a DB-level check to find out whether
file_source is accessible at all (deleted file) or whether it's in the
trashbin of a home storage.

One small corner case where the home storage id is in md5 form cannot
be covered properly with this approach.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-06 13:57:58 +02:00
Morris Jobke c84dc6aa1c Properly catch password policy hint for personal page password changes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-06 10:55:33 +02:00
Lukas Reschke ea9b1cc340 Merge pull request #1306 from nextcloud/simplefs
Introducing AppData
2016-10-06 09:25:15 +02:00
Joas Schilling 4db5b2a2c6
Use magic DI as much as possible
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-05 16:36:49 +02:00
Joas Schilling 3395977d8f
Add a test for all the controllers and the middleware
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-05 15:25:41 +02:00
Lukas Reschke 815616fb2c Merge pull request #1624 from nextcloud/exclude_coverage_dirs
Exclude tests and composer dir from coverage
2016-10-05 14:49:13 +02:00
Lukas Reschke a1f5364d7f
Generate coverage for quick DB tests
This adds the "QUICKDB" group which excludes some tests that abuse unit tests as integration tests as displayed in https://github.com/nextcloud/server/issues/1626

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-05 13:55:44 +02:00
Roeland Jago Douma 408c562427
Exclude tests and composer dir from coverage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 12:05:51 +02:00
Roeland Jago Douma 7512683ea9
Fix avatar tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:17 +02:00
Roeland Jago Douma 6807cb684f
avatar to appdata
* Fix AvatarTest

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Roeland Jago Douma ac38a3a654
Add Tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Christoph Wurst f27b7fa8d1
Do not use underscores in PSR4 namespaces of the backup codes app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-10-03 21:47:33 +02:00
Lukas Reschke bf0371429c
Remove database requirement from test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-03 14:15:18 +02:00
Joas Schilling a1e4b17ff4
Remove unused endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-30 10:21:08 +02:00
Joas Schilling 877cb06bfe
Use magic DI for core controllers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-30 10:00:26 +02:00
Lukas Reschke 341cd0ef61 Merge pull request #1582 from nextcloud/make-comments-100-tested
Add test for setTopmostParentId and getTopmostParentId
2016-09-30 01:04:29 +02:00
Lukas Reschke d5f39164a1
Add test for setTopmostParentId and getTopmostParentId
This wasn't tested before as proven by the coverage data.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-29 22:43:48 +02:00
Joas Schilling 4d1acfd4ef
Only trigger postDelete hooks when the user was deleted...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-29 15:40:53 +02:00
Joas Schilling f6ff60f4cb
Make sure that comments, notifications and preferences are deleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-29 15:40:53 +02:00
Lukas Reschke 0f321fe116 Merge pull request #1534 from nextcloud/svg-optimization
Svgo optimization
2016-09-28 23:05:48 +02:00
Morris Jobke 19f94ac5f9 Merge pull request #1549 from nextcloud/kill-update-simulation
Kill update simulation
2016-09-28 16:29:09 +02:00
skjnldsv 71830b285c Svgo optimization
Signed-off-by: John Molakvoæ <fremulon@protonmail.com>
2016-09-27 20:56:26 +02:00
Lukas Reschke c4d263199c Merge pull request #1521 from nextcloud/fix-mimetypedetect-hiddenfolder
Fix mimetype detection inside hidden folders (#26138)
2016-09-27 18:52:48 +02:00
Vincent Petry da0cea404d
Kill update simulation
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 18:43:53 +02:00
Joas Schilling 615b69677e
Use the same URL everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-27 14:52:22 +02:00
Joas Schilling 6f955defe4
Return the autoupdater value from the server
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-27 14:38:10 +02:00
Vincent Petry 9b4de310bd
Fix mimetype detection inside hidden folders (#26138)
Downstreaming of https://github.com/owncloud/core/pull/26138

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-26 11:31:03 +02:00
Roeland Jago Douma 6dace7f6ad
Add tests 2016-09-15 13:11:36 +02:00
Morris Jobke e39e1bdf4e Merge pull request #1395 from nextcloud/issue-369-htaccess-max-sizes
Make sure memory limit is > post size and upload filesize
2016-09-13 22:39:08 +02:00
Joas Schilling a3c8534b7b
Make sure memory limit is > post size and upload filesize 2016-09-13 16:50:36 +02:00
Joas Schilling db710e0b03
Make tests work with 4.8 at least 2016-09-13 16:31:33 +02:00
Roeland Jago Douma 368f407698
Fix getMock UtilTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 206b48d250
Fix getMock UsersControllerTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma d616984879
Fix getMock User 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 478b86e5e5
Fix getMock UrlGeneratortest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 2f36bbecb8
Fix getMock TagTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 1d166d645b
Fix getMock ManagerTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 7bc2d178ca
Fix getMock CertificateMangerTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 5aad530e6c
Fix getMock RepairUnmergedSharesTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma cd5183dccc
Fix getMock DBLockingProviderTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma dcf8091d69
Fix getMock HelperStorageTest 2016-09-13 09:09:53 +02:00
Roeland Jago Douma 31532ecf13
Fix getMock ViewTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 5069b74f8b
Fix getMock scannertest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma d277053f22
Fix getMock QuotaTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma fe15dccb45
Fix getMock FolderTests 2016-09-13 09:09:52 +02:00
Roeland Jago Douma d77982c03f
Fix getMock UserMountcacheTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 4b8d474ec5
Fix getMock Cache 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 3782edf49c
Fix getMock DecryptAllTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 16e88a7ebf
Fix getMock ManagerTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 77779d678f
Fix getMock FileCacheTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma c4ef825ceb
Fix getMock JobListTest 2016-09-13 09:09:52 +02:00
Roeland Jago Douma 9404c04512
Fix getMock AppTests 2016-09-13 09:09:50 +02:00
Thomas Müller 6eba111e09
Fix failing preview unit tests (#26039) 2016-09-12 16:46:39 +02:00
Thomas Müller 3212e2f9e3
Clean up code coverage
- owncloud/core#26091
2016-09-12 15:03:35 +02:00
Morris Jobke c16aefcff5 Merge pull request #1317 from nextcloud/add-sharing-disclaimer
Adding a optional disclaimer to the anonymous upload page
2016-09-08 21:18:28 +02:00
Morris Jobke 5ac26d12f0 Merge pull request #1247 from nextcloud/storage-id-global-cache
more efficient querying of numeric storage ids
2016-09-08 21:09:14 +02:00
Lukas Reschke 9a2ae2fe7d
Fix tests 2016-09-08 20:11:21 +02:00
Morris Jobke 6bb95de1c5
Adding a optional disclaimer to the anonymous upload page 2016-09-08 18:44:27 +02:00
Joas Schilling 0cec06d0c8
Change updater URL 2016-09-08 12:30:17 +02:00
Lukas Reschke ff691b4d8a Merge pull request #836 from nextcloud/php7.1
Add PHP 7.1 drone tests
2016-09-08 09:19:59 +02:00
Joas Schilling cdfe538452 Merge pull request #1243 from nextcloud/fix-detection-of-file-types-a-bit
Fix detection of file types a bit
2016-09-08 09:19:33 +02:00
Roeland Jago Douma 9d00f367f9
Compare arrays not json strings
In php 7.1 the pretty print json output changed. Thus now we compare
arrays.
2016-09-07 23:06:18 +02:00
Roeland Jago Douma 1cdf4e9540
Set default 2016-09-07 22:09:32 +02:00
Roeland Jago Douma 835daedbbc
Fix getMock settings 2016-09-07 20:42:38 +02:00
Roeland Jago Douma ab797929e2
Fix getMock Updater 2016-09-07 20:42:38 +02:00
Roeland Jago Douma d8a4769cd6
Fix getMock Template 2016-09-07 20:42:38 +02:00
Roeland Jago Douma 9d4729cb6a
Fix getMock TempManagerTest 2016-09-07 20:42:38 +02:00
Roeland Jago Douma 80c519fe89
Fix getMock Share 2016-09-07 20:42:38 +02:00
Roeland Jago Douma 65409f5327
Fix getMock SetupTest 2016-09-07 20:42:38 +02:00
Roeland Jago Douma e1096c964d
Fix getMock Security 2016-09-07 20:42:38 +02:00
Roeland Jago Douma dc60f4c441
Fix getMock Repair 2016-09-07 20:42:38 +02:00
Roeland Jago Douma 1b5ed67857
Fix getMock Migration 2016-09-07 20:42:38 +02:00
Roeland Jago Douma b8b9fc2b1c
Fix getMock OCSClient 2016-09-07 20:42:38 +02:00
Roeland Jago Douma c95d5c77d7
Fix getMock LegacyHelperTest 2016-09-07 20:42:38 +02:00
Roeland Jago Douma f167e65d49
Fix getMock L10NTest 2016-09-07 20:42:38 +02:00
Roeland Jago Douma ba3a90d30c
Fix getMock checkertest 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 97f6410ac8
Fix getMock Http Client 2016-09-07 20:42:37 +02:00
Roeland Jago Douma aa670cab14
Fix getMock HTTPHelper 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 28c801b3d5
Fix getMock MetaDataTest 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 7656a8fa12
File getMock Files tests 2016-09-07 20:42:37 +02:00
Roeland Jago Douma a819fd3f1e
Fix getMock FileChunkingTest 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 4da1ee99d6
Fix getMock Encryption 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 9ea2153e9b
Fix getMock Command/Intergrity 2016-09-07 20:42:37 +02:00
Roeland Jago Douma 4066f04c4b
Fix getMock MapperTestUtility 2016-09-07 20:42:37 +02:00
Morris Jobke 2d9574db34
fix tests 2016-09-07 17:27:41 +02:00
Robin Appelman e8e950a4d2
more efficient querying of numeric storage ids 2016-09-07 17:22:40 +02:00
Roeland Jago Douma 8a5af2d335
Fix tests
* hasParameterOption has an additional default value which we must match
  in the return map
* Fix deprecated getMock calls
2016-09-06 21:20:01 +02:00
Joas Schilling 7c0951244a
Deprecate getEditionString() 2016-09-06 16:05:28 +02:00
Morris Jobke b6bdf81d55 Merge pull request #1275 from nextcloud/OCS_forward_headers_cleanup
Internal OCS Controller cleanup
2016-09-06 14:46:05 +02:00
Roeland Jago Douma 3c55fe6bab
Split OCS version handling
This cleans up a bit the OCSController/Middleware. Since the 2 versions
of OCS differ a bit. Moved a lot of stuff internal since it is of no
concern to the outside.
2016-09-06 11:57:39 +02:00
Roeland Jago Douma c609e291bd
Fix getMock share 2016-09-06 09:33:48 +02:00
Roeland Jago Douma 1a05201543
Fix getMock Avatar 2016-09-06 09:33:48 +02:00
Roeland Jago Douma 4d3b92e687
Fix getMock Authentication 2016-09-06 09:29:27 +02:00
Roeland Jago Douma 3a3a17b2e3
Fix getMock TwoFactorMiddlewareTest 2016-09-06 09:29:27 +02:00
Roeland Jago Douma 777c3ee325
Add FileDisplayResponse
A lazy implementation of the DisplayResponse that only hits the
filesystem if the etag and mtime do not match.
2016-09-05 15:09:54 +02:00
Lukas Reschke 06fa486706 Merge pull request #1158 from nextcloud/cache_avatars
Cache avatars
2016-09-05 15:08:43 +02:00
Joas Schilling db6a3367ad Merge pull request #1259 from nextcloud/language_order
ACCEPT_LANGUAGE goes before default_langauge
2016-09-05 12:37:44 +02:00
Joas Schilling 24d90a4bb1
Correctly remove the charset from finfo mimetype 2016-09-05 09:48:22 +02:00
Roeland Jago Douma 581a83c2a1
Fix AppTest and intergration test 2016-09-05 09:42:58 +02:00
Christoph Wurst ddb659dd90
increase core version number to trigger db ugprade and fix app manager tests 2016-09-05 08:51:13 +02:00
Christoph Wurst 8acb734854
add 2fa backup codes app
* add backup codes app unit tests
* add integration tests for the backup codes app
2016-09-05 08:51:13 +02:00
Roeland Jago Douma 0228bc6e66
ACCEPT_LANGUAGE goes before default_langauge
See https://github.com/nextcloud/server/issues/970

Before we had

1. Users settings in personal settings
2. Admins default language settings
3. Accept-Language settings of the browser

However this is not in line with
https://www.w3.org/International/questions/qa-lang-priorities

So this changes the order to

1. Users settings in personal settings
3. Accept-Language settings of the browser
2. Admins default language settings
2016-09-04 13:19:40 +02:00
Morris Jobke 7ffed2deae Merge pull request #1221 from nextcloud/proper_204_304_response
No body or content-length for 204 and 304 responses
2016-09-01 15:04:09 +02:00
Joas Schilling d3f82356bb Merge pull request #1227 from nextcloud/improve-tests
Improve tests
2016-09-01 14:02:04 +02:00
Morris Jobke a3c1d74829
Remove unneeded Windows logic 2016-09-01 10:47:57 +02:00
Roeland Jago Douma 74fdaab870
Fix depreccated getMock in Core/Command tests 2016-09-01 09:20:54 +02:00
Roeland Jago Douma 21a87d3c2e
No body or content-length for 204 and 304 responses
See: https://tools.ietf.org/html/rfc7230#section-3.3
2016-08-31 23:07:48 +02:00
Lukas Reschke 2685129184 Merge pull request #1188 from nextcloud/2fa-redirect-default-app
redirect to default app after solving the 2FA challenge
2016-08-31 19:46:38 +02:00
Joas Schilling f9cea0b582 Merge pull request #797 from nextcloud/only-match-for-auth-cookie
Match only for actual session cookie
2016-08-31 15:59:16 +02:00
Joas Schilling e4311a2ebd Merge pull request #608 from nextcloud/small-encryption-improvement
skip shared files, if files get decrypted only for a specific user we…
2016-08-31 12:30:37 +02:00
Lukas Reschke 57f9117843 Merge pull request #1087 from nextcloud/get-delay-twice
dont get bruteforce delay twice
2016-08-30 18:43:01 +02:00
Christoph Wurst 8e5c4c91fa check same URL in unit tests 2016-08-30 13:28:04 +02:00
Christoph Wurst 0a0c7a9b92 redirect to default app after solving the 2FA challenge 2016-08-30 11:10:45 +02:00
Roeland Jago Douma 6a85882f61
Fix tests 2016-08-30 09:00:22 +02:00
Morris Jobke e341bde8b9 Merge pull request #1172 from nextcloud/core_cleanup
Core controller cleanup
2016-08-30 08:32:55 +02:00
Morris Jobke 4afe4bda26 Merge pull request #891 from nextcloud/us_25810
[OC] Fix unmerged shares repair targetdecision
2016-08-30 08:22:34 +02:00
Roeland Jago Douma b1a090f357
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON
* Fix tests
2016-08-29 21:52:14 +02:00
Roeland Jago Douma f6423f74e3
Minor cleanup in core Controllers 2016-08-29 21:52:09 +02:00
Christoph Wurst 291dd0bd31 redirect to 2fa provider if there's only one active for the user 2016-08-29 18:36:39 +02:00
Jörn Friedrich Dreyer d5518735c9
always return numeric storage id as int, also check type equality in test asserts 2016-08-29 14:20:51 +02:00
Robin Appelman 6c93fe08f5 dont get bruteforce delay twice 2016-08-29 13:36:49 +02:00
Lukas Reschke 4d85ffc27c Merge pull request #1054 from nextcloud/less-cache-hits
Reduce the number of cache operations for dav operations
2016-08-27 22:44:29 +02:00
Lukas Reschke 8bf9be2167 Merge pull request #1058 from nextcloud/avatarController_cleanup
Avatar controller cleanup
2016-08-27 22:25:34 +02:00
Joas Schilling 89c78bbce4 Merge pull request #1031 from nextcloud/2fa-infinite-redirect-loop
prevent infinite redirect loops if the there is no 2fa provider to pass
2016-08-26 16:03:05 +02:00
Joas Schilling ad4cab130e Merge pull request #1069 from nextcloud/l10ntest_nodb
L10N tests do not require DB
2016-08-25 23:38:27 +02:00
Roeland Jago Douma c5bdb4d4e8
L10N tests do not require DB
* Makes CI a bit more efficient
* Cleanup getMock warning
2016-08-25 22:41:23 +02:00
Roeland Jago Douma 04cffe6d81
CappedMemoryCacheTest does not require DB
Makes CI a bit more efficient
2016-08-25 22:32:39 +02:00
Roeland Jago Douma 2f03853fb9
AvatarController cleanup
* Use all DI components
* Let the AppFramework resolve the AvatarController
* Update unit tests
* Unit tests no longer require DB
2016-08-25 21:39:14 +02:00
Robin Appelman 2693ae870e cache user folders 2016-08-25 17:22:25 +02:00
Lukas Reschke a27a8d733b Merge pull request #1024 from nextcloud/remove-password-reset-link-after-successful-login
Remove "password reset token" after successful login
2016-08-24 13:44:41 +02:00
Christoph Wurst 6af2efb679
prevent infinite redirect loops if the there is no 2fa provider to pass
This fixes infinite loops that are caused whenever a user is about to solve a 2FA
challenge, but the provider app is disabled at the same time. Since the session
value usually indicates that the challenge needs to be solved before we grant access
we have to remove that value instead in this special case.
2016-08-24 10:49:23 +02:00
Lukas Reschke 2f1b17d44a Merge pull request #1007 from nextcloud/shared-storage-non-recursive
Fix shared storage recursive setup
2016-08-23 22:15:38 +02:00
Joas Schilling 736e884e9a
Move the reset token to core app 2016-08-23 15:01:38 +02:00
Robin Appelman a0c2342c20 prevent infinite recursion while getting storage from mount 2016-08-23 14:52:18 +02:00
Joas Schilling 139fb8de94
Remove "password reset token" after successful login 2016-08-23 12:54:45 +02:00
Lukas Reschke 3ed102497e Merge pull request #995 from nextcloud/workflow-section
Workflow section + hidden empty sections
2016-08-23 11:20:43 +02:00
Arthur Schiwon 5cd3f4e4dc
add test 2016-08-22 16:56:00 +02:00
Arthur Schiwon baa91809bd
adjust test 2016-08-22 08:29:49 +02:00
Arthur Schiwon 7972fa5527
enlist only registered sections that also have settings registered to 2016-08-22 08:29:49 +02:00
Lukas Reschke d50e7ee36c
Remove reading PATH_INFO from server variable
Having two code paths for this is unreliable and can lead to bugs. Also, in some cases Apache isn't setting the PATH_INFO variable when mod_rewrite is used.

Fixes https://github.com/nextcloud/server/issues/983
2016-08-19 14:48:13 +02:00
Julius Haertl 162b153f22
Fix loading of ThemingDefaults 2016-08-19 11:26:22 +02:00
Roeland Jago Douma fe80bb1aff Merge pull request #867 from nextcloud/notification-primary-action-always-first
Make sure the primary action is always the first one
2016-08-17 19:31:14 +02:00
Vincent Petry df9b509ed3
Improve regexp to detect duplicate folders when repairing unmerged shares 2016-08-17 15:31:47 +02:00
Vincent Petry 7a2d25fab4
Fix unmerged shares repair with mixed group and direct shares
Whenever a group share is created after a direct share, the stime order
needs to be properly considered in the repair routine, considering that
the direct user share is appended to the $subShares array and breaking
its order.
2016-08-17 15:31:36 +02:00
Vincent Petry 56b94b220d
Improve file_target finding logic when repairing unmerged shares
Pick the most recent subshare that has no parenthesis from duplication
which should match whichever name the user picked last. If all
subshares have duplicate parenthesis names, use the least recent group
share's target instead.
2016-08-17 15:31:35 +02:00
Roeland Jago Douma c5d0a056de Merge pull request #868 from nextcloud/changepasswordcontroller
Make ChangePassword a real Controller
2016-08-17 11:50:41 +02:00
Joas Schilling 027069cbae Merge pull request #846 from nextcloud/provisioning_api_ocs
Move Provisioning API to the AppFramework
2016-08-17 10:23:13 +02:00
Roeland Jago Douma 789082e014
Add tests for ChangePasswordController 2016-08-17 10:21:18 +02:00
Marius Blüm c1632c3abd Merge pull request #893 from nextcloud/ie8_be_gone
IE8 be gone!
2016-08-17 09:02:58 +02:00
Roeland Jago Douma fd95985a21
Remove IE8 support in CertificateController
* Also fix getMock warnings in tests
2016-08-16 20:51:43 +02:00
Arthur Schiwon 4943441bde
adjust tests to latest changes 2016-08-16 18:59:45 +02:00
Arthur Schiwon 717e22267a
Merge branch 'master' into implement_712 2016-08-16 18:31:59 +02:00
Björn Schießle 6dc956b192 Merge pull request #886 from nextcloud/capabilities_error_proof
Make the capabilities manager more error proof
2016-08-16 11:40:42 +02:00
Lukas Reschke 6c6338b810
Merge branch 'master' into implement_712 2016-08-15 21:55:09 +02:00
Roeland Jago Douma c044aa34fa
Make the capabilities manager more error proof
If an app registers an invalid capabilty we should not crash hard.
Instead we should catch the exception. Log it (error) and carry on.

* Added tests
2016-08-15 20:37:19 +02:00
Roeland Jago Douma 87ac72d004
We have to mock the is_uploaded_file in the OC\Core\Controller namespace 2016-08-15 20:08:20 +02:00
Roeland Jago Douma 09f4ce4389
Fix mock call in AvatarControllerTest 2016-08-15 20:07:07 +02:00
Lukas Reschke cf3cfca356
Use generated URL 2016-08-15 17:37:55 +02:00
Lukas Reschke 910176c540
Fix CheckSetupController tests 2016-08-15 17:36:45 +02:00
Lukas Reschke d6992e3f9f
Fix template test 2016-08-15 17:19:50 +02:00
Lukas Reschke 75d135d8d4
Fix tests for LoginController 2016-08-15 17:19:32 +02:00
Lukas Reschke 1c7fa3333e
Add reference to current user 2016-08-15 17:15:14 +02:00
Lukas Reschke c16c411275
Add new dependency 2016-08-15 17:13:58 +02:00
Lukas Reschke 65d1472005
Don't use create mock
Not compatible with this PHPunit version
2016-08-15 17:08:27 +02:00
Lukas Reschke 166a7667d3
Use proper casing 2016-08-15 17:00:35 +02:00
Lukas Reschke 7ffb7b0d84
Use MockBuilder instead of createMock
CI uses an older PHPUnit
2016-08-15 16:43:22 +02:00
Lukas Reschke 8a7a0f3287
Add unit tests 2016-08-15 16:25:34 +02:00
Joas Schilling 3ed05f8769
Make sure the primary action is always the first one 2016-08-15 11:13:54 +02:00
Roeland Jago Douma a0b22227fc
Add tests 2016-08-14 18:34:01 +02:00
Lukas Reschke 72b5f9bfac
Use createMock instead of deprecated getMock 2016-08-11 15:22:29 +02:00
Lukas Reschke 9ca25e857c
Redirect users when already logged-in on login form 2016-08-11 15:22:29 +02:00
Roeland Jago Douma 1f370c97ed
OCSController requires DataResponse
The OCS Controller requires a DataResponse object to be returned.
This means that all error handling will have to be done via exceptions
thrown and handling in the middleware.
2016-08-10 12:40:26 +02:00
Lukas Reschke 9fbdb0efe8 Merge pull request #529 from nextcloud/vendor-maintenance-downgrade
Allow downgrades of maintenance accross vendors
2016-08-10 00:25:53 +02:00
Lukas Reschke 5214b62d55 Merge pull request #691 from nextcloud/ocs_allow_all_old_routes
Allow ocs/v2.php/cloud/... routes
2016-08-09 20:52:49 +02:00
Lukas Reschke b53ea18ea5
Match only for actual session cookie
OVH has implemented load balancing in a very questionable way where the reverse proxy actually internally adds some cookies which would trigger a security exception. To work around this, this change only checks for the session cookie.
2016-08-09 19:23:08 +02:00
Lukas Reschke b4ed4e152e Merge pull request #746 from nextcloud/jail-root
getJailedPath expects $path to have a trailing /
2016-08-09 11:04:11 +02:00
Roeland Jago Douma 0032a5c2d1
Hanlde Core and Settings app in AppFramework
'core' and 'settings' are just apps but we treat them slightly
different. Make sure that we construct the correct namespace so we can
actually do automatic AppFramework stuff.
2016-08-08 20:48:16 +02:00
Roeland Jago Douma 63f6d2d558
Allow ocs/v2.php/cloud/... routes
One of the possibilities of the old OCS API is that you can define the
url yourself.

This PR makes this possible again by adding an optional root elemenet to
the route. Routes are thus:

.../ocs/v2.php/<root>/<url>

By default <root> = apps/<app>

This will allow for example the provisioning API etc to be in
../ovs/v2/php/cloud/users
2016-08-08 15:01:26 +02:00
Joas Schilling f37fa6e45c
Move Share backends to PSR-4 instead of using class path (#24941) 2016-08-05 14:13:41 +02:00
Thomas Müller f1cd68d713 Adding test case for getPathById including a jailed cache where root is just empty 2016-08-05 14:06:05 +02:00
Vincent Petry 0c6352e095
Fix RepairUnmergedShares to not skip valid repair cases
The repair step was a bit overeager to skip repairing so it missed the
case where a group share exists without subshares but with an
additional direct user share.
2016-08-03 10:16:28 +02:00
Vincent Petry 67fa6bf9bc
Add repair step for unmerged shares (WIP) 2016-08-03 10:16:28 +02:00
Roeland Jago Douma 5c718b13b8
We should properly check for 'true' instaed of the bool 2016-08-01 08:52:50 +02:00
Roeland Jago Douma f7f5216aa3
Dark hackery to not always disable CSRF for OCS controllers 2016-07-29 15:49:27 +02:00
Morris Jobke 54ae8eede3 Merge pull request #556 from nextcloud/nextcloud-version-check
Allow apps to check for a given nextcloud version
2016-07-29 09:26:25 +02:00
Bjoern Schiessle 351cab6bce
skip shared files, if files get decrypted only for a specific user we shouldn't touch files owned by a different user. 2016-07-27 15:39:24 +02:00
Roeland Jago Douma 8bdd0adcee
Support subdir in the OCS v2 endpoint
We should check against the ending substring since people could
run their nextcloud in a subfolder.

* Added test
2016-07-27 15:28:35 +02:00
Morris Jobke 9c21067c19
fix enabled apps tests 2016-07-27 08:36:03 +02:00
Morris Jobke 6482be040b
fix unit tests 2016-07-26 16:43:58 +02:00
Joas Schilling 0fcc39cd8e
Translate the server version for nextcloud 2016-07-26 14:40:18 +02:00
Morris Jobke 2f42a3fc31
Add workflowengine 2016-07-26 11:16:34 +02:00
William Bargent 352e24e703 Merge pull request #292 from nextcloud/recent-files
Add "Recent" file listing
2016-07-25 15:25:02 +01:00
Joas Schilling 4ad0c383ad Merge pull request #523 from Faldon/master
Renamed file logging
2016-07-25 11:41:24 +02:00
Robin Appelman 81e103074e use limit instead of since when listing recent files 2016-07-22 15:20:55 +02:00
Robin Appelman a4ba3eadd0 fix test 2016-07-22 15:20:55 +02:00
Joas Schilling 5c34346479
Allow downgrades of maintenance accross vendors 2016-07-22 14:51:43 +02:00
Thomas Pulzer 61a1d56d27 Renamed test classes for file logging tests. 2016-07-22 14:47:50 +02:00
Robin Appelman e321ecd592 add recent files to node api 2016-07-22 14:39:32 +02:00
Roeland Jago Douma 72b06d250d
Add tests 2016-07-22 12:53:47 +02:00
Thomas Pulzer ba3f4f118e Changed logtype to file instead of owncloud.
- Updated the config sample to point to log_type='file'
- Renamed the Class for logfile logging to File in namespace 'OC\Log\'.
  Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'.
- Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'.
  Changed registration of the command to use 'OC\Core\Command\Log\File'.
- Changed default Syslog tag to Nextcloud
- Retained backwards compatibility for configs with 'logtype' => 'owncloud'

- Adjusted tests for the new file log.

Closes #490.
2016-07-22 11:44:19 +02:00
Lukas Reschke c385423d10 Merge pull request #479 from nextcloud/add-bruteforce-throttler
Implement brute force protection
2016-07-21 00:31:02 +02:00
Lukas Reschke c1589f163c
Mitigate race condition 2016-07-20 23:09:27 +02:00
Lukas Reschke ba4f12baa0
Implement brute force protection
Class Throttler implements the bruteforce protection for security actions in
Nextcloud.

It is working by logging invalid login attempts to the database and slowing
down all login attempts from the same subnet. The max delay is 30 seconds and
the starting delay are 200 milliseconds. (after the first failed login)
2016-07-20 22:08:56 +02:00
Lukas Reschke 020a2a6958 Merge pull request #476 from nextcloud/port-same-site-cookies
[master] Port Same-Site Cookies to master
2016-07-20 21:35:02 +02:00
Roeland Douma 78cad699fe Merge pull request #475 from nextcloud/ocs-middleware
Add OCS Middleware
2016-07-20 21:04:25 +02:00
Morris Jobke e08278494d Merge pull request #471 from nextcloud/storage-fopenspecialchars
Added storage tests for fopen with special chars
2016-07-20 20:56:59 +02:00
Roeland Jago Douma 5f32b57332
Add unit tests 2016-07-20 20:03:49 +02:00
Lukas Reschke a299fa38a9
[master] Port Same-Site Cookies to master
Fixes https://github.com/nextcloud/server/issues/50
2016-07-20 18:37:57 +02:00
Morris Jobke 1264e9644f Merge pull request #402 from nextcloud/smb-notifications
smb update notifications
2016-07-20 16:19:21 +02:00
Vincent Petry 631af42b3a
Added storage tests for fopen with special chars
This makes it possible to test special chars with unit tests.
There is already a test for directories but there was none for file
names.
2016-07-20 15:13:24 +02:00
Roeland Jago Douma 0bda09236e
Add route tests 2016-07-18 11:09:49 +02:00
Roeland Douma 6f9236fb3b Merge pull request #381 from nextcloud/postgres-setup
use pdo for postgres setup
2016-07-15 21:30:51 +02:00
Roeland Douma f8167c0f9a Merge pull request #395 from nextcloud/user-preferences-occ
Allow to change user preferences via occ
2016-07-15 21:26:07 +02:00
Joas Schilling aaf2be4c3d
Use argument instead of value 2016-07-14 15:09:47 +02:00
Roeland Jago Douma a3fa0d00c3
Cleanup ManagerTest
* Fix deprecated getMock call
* No longer requires DB
2016-07-14 13:49:18 +02:00
Joas Schilling 4656b79c8e
FIx my email 2016-07-13 18:46:27 +02:00
Joas Schilling dcacdde1ea
Add tests for set/get/delete/list 2016-07-13 18:43:57 +02:00
Joas Schilling f574a9d44f
Make sure the exception is catched 2016-07-13 18:43:53 +02:00
Joas Schilling 01899b8cf1
Add tests for checkInput() 2016-07-13 18:43:50 +02:00
Joas Schilling c04e7b13c3 Merge pull request #392 from nextcloud/roottest_nodb
RootTest does not require DB
2016-07-13 16:54:19 +02:00
Robin Appelman 29eeeb2273 Save the files external mount id in the mount cache table 2016-07-13 16:34:08 +02:00
Roeland Jago Douma 927be847b9
RootTest does not require DB
* Removed from DB group
* Also mock the manager
* Fixed deprecated getMock warnings
2016-07-13 14:35:34 +02:00
Robin Appelman b288c6796a fix test 2016-07-13 14:33:04 +02:00
Roeland Jago Douma f2d091a963
Fix failing tests after db split 2016-07-13 09:26:19 +02:00
Roeland Jago Douma 8d739f308b
Some UtilTests require DB
In the current setup there is no DI so no way to mock them.
2016-07-11 21:05:39 +02:00
Roeland Jago Douma 5b6f5f1a07
LegacyGroupTest need DB
Those old tests make it impossible in the current state to abstract
away.
2016-07-11 21:02:27 +02:00
Roeland Jago Douma 4ebf001b2e
Improve ManagerTest
* No DB required
* Fixed phpunit 5.4 warnings
2016-07-11 21:02:27 +02:00
Roeland Jago Douma 31018adab3
Improve GroupTest
* No longer require DB
2016-07-11 21:02:27 +02:00
Björn Schießle e8169e0d71 Merge pull request #364 from nextcloud/ca-bundle-tests
add test for needsRebundling() check
2016-07-11 17:34:31 +02:00
Bjoern Schiessle 7c64e1973f
add test for needsRebundling() check 2016-07-11 15:51:48 +02:00
Roeland Jago Douma 3b4535c3be
Improve NodeTest
* Do not use DB
* Fix phpunit-5.4 warnigns
* Moved commong stuff to setup
2016-07-11 15:41:02 +02:00
Lukas Reschke 0c1cf5f7eb Merge pull request #347 from nextcloud/drop-windows-foo
Remove unneeded checks if it runs on a Windows machine
2016-07-11 13:16:03 +02:00
Joas Schilling 6ea77abb38
Fix some more tests 2016-07-11 10:59:27 +02:00
Morris Jobke 1ace70d2c2 Merge pull request #351 from nextcloud/improve_filetest_unittest
Improve FileTest
2016-07-11 10:40:13 +02:00
Roeland Jago Douma 937c9519d6
Mock logger 2016-07-11 08:50:30 +02:00
Roeland Jago Douma 2fa9e67294
Fix phpunit-5.4 wargning
* getMock is deprecated.
* \PDOStatement mocking fails hard on phpunit 4.8
2016-07-11 08:50:07 +02:00
Roeland Jago Douma 58dd278b4e
Correction is no longer required in php7 2016-07-08 19:36:17 +02:00
Roeland Jago Douma c91aebc437
Fix phpunit Trait warning 2016-07-08 19:36:17 +02:00
Roeland Jago Douma 3a60626b77
Improve FileTest
* No longer requires DB
* Fixed phpunit 5.4 warnings
* Moved common stuff to Setup phase
2016-07-08 19:35:51 +02:00
Morris Jobke c2d88a08b7
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
2016-07-08 15:55:17 +02:00
Lukas Reschke c8ba8f637e Merge pull request #314 from jernst/master
Allow wildcard * to be used in trusted domains
2016-07-07 19:34:11 +02:00
Morris Jobke 2791b8f00d Revert "occ web executor (#24957)"
This reverts commit 854352d9a0.
2016-07-07 12:14:45 +02:00
Morris Jobke ba16fd0d33 Merge branch 'master' into sync-master 2016-07-07 11:29:46 +02:00
Johannes Ernst 66a134e69e Disallow certain malformed domain names even if they match the trusted domain expression
Stricter checking for valid domain names
2016-07-06 23:51:04 +00:00
Johannes Ernst 2b4ceae620 Trusted domain wildcard checking made shorter, supporting multiple *
Added test cases
2016-07-06 23:38:30 +00:00
Vincent Petry d769e718a5 Set content type when downloading log file to force download in some browsers (#25382) 2016-07-06 22:47:16 +02:00
Thomas Müller d2d99a91a0 fix swift primary object store test (#25281)
* Wait for socket to be open

* Fix call on null

* Allow DB access for MountProviderTest

Makes unit tests pass when using object store, since their FS access is
actually oc_filecache DB access. It is currently not possible to mock
or bypass the logic from "SharedMount::verifyMountPoint()" triggered by
this test.
2016-07-05 08:54:51 +02:00
Thomas Pulzer 90b7f74da7 Changed name of default logfile from owncloud.log to nextcloud.log. 2016-07-04 11:50:32 +02:00
Vincent Petry 6f92aef265 Merge pull request #25276 from owncloud/delete-own-session-token
prevent users from deleting their own session token
2016-07-01 16:15:31 +02:00
Lukas Reschke 179a355b2c Merge remote-tracking branch 'upstream/master' into master-sync-upstream 2016-07-01 11:36:35 +02:00
Lukas Reschke 700a57d8b6 Set content-type to "application/octet-stream"
Some browsers such as Firefox on Microsoft Windows otherwise do offer to open the file directly which is kinda silly.
2016-06-30 12:47:46 +02:00
Morris Jobke 3acdc1339d Merge pull request #206 from nextcloud/ci-mysql
Add mysql job to CI
2016-06-30 09:06:19 +02:00
Morris Jobke 01829e8d7c mysql only works with 3 byte UTF-8 2016-06-29 15:53:23 +02:00
Thomas Müller b55ab6d22a Various database migration fixes (#25209)
* String columns with a length higher then 4000 are converted into a CLOB columns automagically - we have to respect this when migrating

* Adding schema migration tests to prevent unnecessary and non-sense migration steps
Fix Oracle autoincrement and unsigned handling

* Fix sqlite integer type for autoincrement

* Use lower case table names - fixes pg

* Fix postgres with default -1 - this only affect pg 9.4 servers - 9.5 seems to work fine
2016-06-29 14:54:41 +02:00
Christoph Wurst c9a2790893 prevent users from deleting their own session token 2016-06-28 16:17:37 +02:00
Christoph Wurst 1710de8afb Login hooks (#25260)
* fix login hooks

* adjust user session tests

* fix login return value of successful token logins

* trigger preLogin hook earlier; extract method 'loginWithPassword'

* call postLogin hook earlier; add PHPDoc
2016-06-27 22:16:22 +02:00
Lukas Reschke 6670d37658 Merge remote-tracking branch 'upstream/master' into master-sync-upstream 2016-06-27 18:23:00 +02:00
Bjoern Schiessle 2a990a0db5
verify user password on change 2016-06-27 14:08:11 +02:00
Bjoern Schiessle d4989c8037
remove old hook, no longer needed 2016-06-27 14:05:27 +02:00
Bjoern Schiessle 630e4b1b46
check password for link shares 2016-06-27 14:05:27 +02:00
Vincent Petry 199c8e304c Merge pull request #25250 from owncloud/linkshare-includedeletewithuploadperms
Add explicit delete permission to link shares
2016-06-27 12:14:05 +02:00
Lukas Reschke 7a9d60d87e
Merge remote-tracking branch 'upstream/master' into master-upstream-sync 2016-06-26 12:55:05 +02:00
Christoph Wurst 89198e62e8 check login name when authenticating with client token 2016-06-24 13:57:09 +02:00
Vincent Petry 0ad065cb8d Repair step to adjust link share delete permissions 2016-06-24 09:48:48 +02:00
Vincent Petry 955635c7aa Add explicit delete permission to link shares
Link shares always allowed deletion, however internally the permissions
were stored as 7 which lacked delete permissions. This created an
inconsistency in the Webdav permissions.

This fix makes sure we include delete permissions in the share
permissions, which now become 15.

In case a client is still passing 7 for legacy reasons, it gets
converted automatically to 15.
2016-06-24 09:48:48 +02:00
Vincent Petry 3db5de95bd Merge pull request #25172 from owncloud/token-login-validation
Token login validation
2016-06-22 13:58:56 +02:00
VicDeo 854352d9a0 occ web executor (#24957)
* Initial web executor

* Fix PHPDoc

Fix broken integration test

OccControllerTests do not require database access - moch them all!

Kill unused sprintf
2016-06-22 13:12:36 +02:00
Lukas Reschke 2b493e2f9d
Merge remote-tracking branch 'upstream/master' into master-sync-upstream 2016-06-21 11:18:22 +02:00
Christoph Wurst b805908dca
update session token password on user password change 2016-06-21 10:24:25 +02:00
Morris Jobke 62e6de5df3
fix unit tests 2016-06-20 13:52:51 +02:00
Christoph Wurst 56199eba37
fix unit test warning/errors 2016-06-20 10:41:23 +02:00
Christoph Wurst fb36fd495b
fix DefaultTokenMapperTest 2016-06-20 09:25:15 +02:00
Christoph Wurst 5c68084823
fix default token provider tests 2016-06-20 09:17:19 +02:00
Christoph Wurst 8ef5431e7a
fix user session tests 2016-06-20 09:10:11 +02:00
Christoph Wurst c4149c59c2
use token last_activity instead of session value 2016-06-17 15:42:28 +02:00
Christoph Wurst 82b50d126c
add PasswordLoginForbiddenException 2016-06-17 11:02:07 +02:00
Christoph Wurst 3521f974db
assert app is loaded in unit tests 2016-06-16 11:08:43 +02:00
Christoph Wurst a40d64ff7f
load 2FA provider apps before querying classes 2016-06-16 10:12:16 +02:00
Vincent Petry 9c328de4ab Merge pull request #24415 from owncloud/optimize_sharingdisabled_for_user
Optimize isSharingDisabledForUser
2016-06-16 09:27:48 +02:00
Vincent Petry 1251df3e17 Merge pull request #25075 from owncloud/fix_23265
Remove shares of the root folder
2016-06-16 09:27:06 +02:00
Vincent Petry 05967a6904 Merge pull request #25093 from owncloud/issue-12816-clean-tags-from-deleted-users
Clean up tags of deleted users
2016-06-15 12:20:29 +02:00
Roeland Jago Douma ea4c5e6e0a
Fix unit tests 2016-06-14 13:24:48 +02:00
Joas Schilling 123bf78ca8
Clean up tags of deleted users 2016-06-14 12:38:09 +02:00
Arthur Schiwon ae02685e6f
Merge branch 'master' of https://github.com/owncloud/core into downstream-160614 2016-06-14 01:06:25 +02:00
Christoph Wurst 465807490d
create session token only for clients that support cookies 2016-06-13 19:44:05 +02:00
Roeland Jago Douma 64471b5d4a
Remove shares of the root folder
Fixes #23265

(A possibly costly) repair job to remove cyclic shares.
2016-06-13 15:07:41 +02:00
Christoph Wurst 5daa9a5417 fail hard if 2fa provider can not be loaded (#25061) 2016-06-13 12:46:45 +02:00
Arthur Schiwon 42c66efea5
Merge branch 'master' of https://github.com/owncloud/core into downstream-160611 2016-06-11 15:34:43 +02:00
Lukas Reschke 842cc2a788 Merge pull request #19 from nextcloud/files-drop
add "hide file list" option
2016-06-10 18:29:09 +02:00
Vincent Petry 52a0c939ab Merge pull request #24863 from owncloud/propagator-batching
Propagator batching for the file scanner
2016-06-10 17:45:52 +02:00
Joas Schilling 60225284f3
Add not-null columns for oracle 2016-06-10 12:44:49 +02:00
Roeland Jago Douma 1b66db72d9
Repair job to fix permissions for avatars
Fixes #22978

On some older installations the permissions for the userRoot and the
avatars are not correct. This breaks since we now use the Node API in
the avatar code.

This repair job makes sure that the permissions are set correctly.

* Unit tests added
2016-06-10 12:44:49 +02:00
Vincent Petry d81dac24aa Merge pull request #25025 from owncloud/clear_old_calendar_shares
Add repair step to clean old calendar shares
2016-06-10 10:42:04 +02:00
Arthur Schiwon a636e4ff28
Downstream 2016-06-09
Merge branch 'master' of https://github.com/owncloud/core into downstream-160609
2016-06-09 18:45:12 +02:00
blizzz 51fd2602a7 Revert "Downstream 2016-06-08" 2016-06-09 17:41:57 +02:00
Thomas Müller 232d735893
Do not leak the login name - fixes #25047 2016-06-09 16:44:31 +02:00
Roeland Jago Douma 7d51fd0310
Add repair step to clean old calendar/contact shares
fixes #21889
2016-06-09 15:48:45 +02:00
Bjoern Schiessle bb54ab0db8
add hide file list option 2016-06-09 15:15:17 +02:00
Joas Schilling 7f88645eab
Allow to cancel 2FA after login 2016-06-09 14:00:02 +02:00
Robin Appelman bee918693a
dissalow symlinks in local storages that point outside the datadir 2016-06-09 14:00:01 +02:00
Joas Schilling 4f27c2c433
Allow to decrypt user '0' files only 2016-06-09 14:00:00 +02:00
Christoph Wurst 60e15e934c
do not generate device token if 2FA is enable for user 2016-06-09 14:00:00 +02:00
Joas Schilling 0041d89dc2
Do not allow to store boolean configs, they behave unexpected on postgres 2016-06-09 13:59:58 +02:00
Robin Appelman 67c2c85b05
allow deleting "ghost files" trough the View and Node api 2016-06-09 13:59:58 +02:00
Vincent Petry 826e276a79 Merge pull request #24973 from owncloud/token-password-session-token
When creating a session token, make sure it's the login password and …
2016-06-09 11:58:04 +02:00
Vincent Petry aca4ea12c1 Merge pull request #24826 from owncloud/cors-client-login
use client login method on CORS routes
2016-06-09 10:31:14 +02:00
Joas Schilling e49307014c Do not log token or challenge with exception stacktrace (#25026)
* Make the filtering better readable

* Add some more methods to the sensitive list
2016-06-08 16:32:58 +02:00
Christoph Wurst 9997c431c3
use client login method on CORS routes 2016-06-08 15:18:53 +02:00
Christoph Wurst ec929f07f2
When creating a session token, make sure it's the login password and not a device token 2016-06-08 13:31:55 +02:00
Vincent Petry 7dcc47dc94 Merge pull request #25011 from owncloud/issue-24745-allow-to-cancel-2fa
Allow to cancel 2FA after login
2016-06-08 10:27:21 +02:00
Vincent Petry 8d0948977e Merge pull request #24899 from owncloud/local-storage-symlinks
dissalow symlinks in local storages that point outside the datadir
2016-06-08 10:19:24 +02:00
Vincent Petry ed92f4c427 Merge pull request #24983 from owncloud/issue-23776-do-not-allow-boolean-user-config
Do not allow to store boolean configs, they behave unexpected on postgres
2016-06-08 10:14:08 +02:00
Vincent Petry 12683b786d Merge pull request #24991 from owncloud/2fa-do-not-generate-token
do not generate device token if 2FA is enable for user
2016-06-08 10:13:04 +02:00
Vincent Petry b7935dcebd Merge pull request #24998 from owncloud/issue-24994-allow-decrypting-user-0-only
Allow to decrypt user '0' files only
2016-06-08 10:12:28 +02:00
Joas Schilling 3e3b326c85
Allow to cancel 2FA after login 2016-06-07 18:17:29 +02:00
Morris Jobke 38451c85f1
skip failing tests 2016-06-07 17:54:40 +02:00
Robin Appelman 7b1b723e5b dissalow symlinks in local storages that point outside the datadir 2016-06-07 14:01:53 +02:00
Joas Schilling d4ba982131
Allow to decrypt user '0' files only 2016-06-07 09:13:11 +02:00
Christoph Wurst 8f7a4aaa4d
do not generate device token if 2FA is enable for user 2016-06-07 09:09:51 +02:00
Joas Schilling 911fd3ead4
Do not allow to store boolean configs, they behave unexpected on postgres 2016-06-06 12:38:20 +02:00
Robin Appelman 63408fa6ef allow deleting "ghost files" trough the View and Node api 2016-06-03 13:30:59 +02:00
Vincent Petry 1ab7ee5e23 Merge pull request #24940 from owncloud/fix-normalizedcachekey-keepunicode
Add keepUnicode value in the cache key of normalizedPathCache
2016-06-02 15:18:13 +02:00
Robin Appelman 11900baaf3 add tests for propagator batching 2016-06-02 15:09:15 +02:00
Christoph Wurst 5e71d23ded
remember redirect_url when solving the 2FA challenge 2016-06-01 14:43:47 +02:00
Vincent Petry 5b1eb416d8
Fix TestCase::invokePrivate to work with static classes 2016-06-01 14:28:59 +02:00
Vincent Petry 5ad8fa7675
Add keepUnicode value in the cache key of normalizedPathCache 2016-06-01 14:28:59 +02:00
Christoph Wurst c58d8159d7
Create session tokens for apache auth users 2016-05-31 17:07:49 +02:00
Vincent Petry a441220f24 Merge pull request #24628 from owncloud/decryptall-checkifneedsprocessing
[decrypt_all] Check if file needs to decrypted or not for speed up large oc setups.
2016-05-31 10:12:03 +02:00
Torben Dannhauer 718f0757e4 Fix for #23066 (#24689) 2016-05-31 06:53:28 +02:00
Björn Schießle b15babd061
fix unit tests 2016-05-30 14:49:27 +02:00
Joas Schilling 4b1e8a1184 One more PSR-4 fix (#24852) 2016-05-26 16:31:26 +02:00
Vincent Petry 379f8a1e45 Merge pull request #24604 from owncloud/user_ldap-psr4
Move user_ldap to PSR-4
2016-05-25 17:11:10 +02:00
Joas Schilling 2c0743c46b
Fix the tests again 2016-05-25 16:51:02 +02:00
Vincent Petry 2bddf71f22 Merge pull request #24842 from owncloud/files-storage-wrapper-encoding-psr4
Move Test\Files\Storage\Wrapper\EncodingTest to PSR-4
2016-05-25 16:32:43 +02:00
Vincent Petry 299954c03d Merge pull request #24840 from owncloud/fix-missing-ext-str-import
Fix missing use statements in ext. str. tests
2016-05-25 16:31:32 +02:00
Joas Schilling 4cfefda891
Move Test\Files\Storage\Wrapper\EncodingTest to PSR-4 2016-05-25 15:26:14 +02:00
Vincent Petry 7f20203006 Merge pull request #24836 from owncloud/auth-tests-to-psr4
Move parallel merged auth tests to PSR-4
2016-05-25 15:15:19 +02:00
Joas Schilling 154e328e2b
Adjust the phpunit config 2016-05-25 15:14:37 +02:00
Joas Schilling 8afbd80328
Move parallel merged auth tests to PSR-4 2016-05-25 12:02:05 +02:00
Vincent Petry 25e6026fa6 Merge pull request #24735 from juliushaertl/passwordreset-invalid
Show error messages if a password reset link is invalid or expired
2016-05-25 11:08:46 +02:00
Christoph Wurst 28ce7dd262
do not allow client password logins if token auth is enforced or 2FA is enabled 2016-05-24 17:54:02 +02:00
Vincent Petry d3fb5d618e Merge pull request #24748 from owncloud/login-explicitly
Log in explicitly, save login name when generating browser/device tokens
2016-05-24 17:51:49 +02:00
Vincent Petry e7110c7678 Merge pull request #24760 from owncloud/objectstore_multibucket
Objectstore multibucket
2016-05-24 15:15:59 +02:00
Christoph Wurst ad10485cec
when generating browser/device token, save the login name for later password checks 2016-05-24 11:49:15 +02:00
Roeland Jago Douma abe338f433
Store user bucket in preferences 2016-05-23 21:57:41 +02:00
Vincent Petry 4f6670d759 Merge pull request #24658 from owncloud/invalidate-disabled-user-session
invalidate user session if the user was disabled
2016-05-23 20:50:25 +02:00
Vincent Petry 87fa86a69a Merge pull request #24559 from owncloud/2fa
two factor auth
2016-05-23 20:50:03 +02:00
Roeland Jago Douma e03e4921a0
Fix Name 2016-05-23 20:42:08 +02:00
Roeland Jago Douma 7ef21b0b27
Add unit tests for ObjectHomeMountProvider 2016-05-23 20:42:08 +02:00
Roeland Jago Douma 12b63258d5
Add mapper unit tests 2016-05-23 20:42:08 +02:00
Julius Haertl d065980814 Add more tests for OC\Core\Controller\LostController
- remove testResetFormUnsuccessful as it is now splitted up in different test cases
- add testResetFormInvalidToken to check if timestamp and token are present
- add testResetFormInvalidTokenMatch to check if the saved token matches the provided
- add testResetFormExpiredToken to check if expiration detection works
- add testResetFormValidToken to check if detection of valid tokens works
2016-05-23 16:48:10 +02:00
Robin Appelman eca57be336 Only recurse into incomplete folders during background scans 2016-05-23 14:40:35 +02:00
Vincent Petry 57525a02f8 Merge pull request #24703 from owncloud/personal-settings-auth-tokens
Personal settings auth tokens
2016-05-23 14:17:01 +02:00
Vincent Petry bd87f67473 Merge pull request #24349 from owncloud/nfd-storagewrapper
Add wrapper for NFD encoding workaround
2016-05-23 13:45:33 +02:00
Christoph Wurst dfb4d426c2
Add two factor auth to core 2016-05-23 11:21:10 +02:00
Christoph Wurst c20cdc2213
invalidate user session if the user is disabled 2016-05-23 10:32:16 +02:00
Vincent Petry dec3f9ebcb Merge pull request #24726 from owncloud/tests-psr-4
Tests outside of tests/lib/ to PSR-4
2016-05-23 09:54:29 +02:00
Vincent Petry 5ba1add03c Merge pull request #24603 from owncloud/federated_reshare
flat federated re-share
2016-05-23 09:52:13 +02:00
Christoph Wurst 74277c25be
add button to invalidate browser sessions/device tokens 2016-05-23 09:11:12 +02:00
Christoph Wurst 6495534bcd
add button to add new device tokens 2016-05-23 09:11:12 +02:00
Christoph Wurst 12431aa399
list user's auth tokens on the personal settings page 2016-05-23 09:11:12 +02:00
Vincent Petry 7a6966cdfe Merge pull request #24732 from owncloud/autoloader_fix
Autoloader fix
2016-05-21 19:09:22 +02:00
Vincent Petry 8646802850 Merge pull request #24696 from owncloud/lock-jobs-while-executing
Lock jobs while executing them, to allow multiple executors to run in…
2016-05-21 19:08:15 +02:00
Joas Schilling d0a2fa0506
Lock jobs while executing them, to allow multiple executors to run in parallel 2016-05-21 01:59:25 +02:00
Björn Schießle 7b25839bd5
use share initiator as fall back to access the file
in case of federated re-shares the owner can be a remote user.
Therefore we can't always use to owner to access the local file
2016-05-20 21:15:15 +02:00
Vincent Petry 88740f035d
Act on effective system tag canAssign permission
Whenever the server returns true for the can-assign Webdav property of
a system tag, it means the current user is allowed to assign,
regardless of the value of user-assignable.

This commit brings the proper logic to the web UI to make it possible
for users to assign when they have the permission.
2016-05-20 17:56:02 +02:00
Vincent Petry b5eb3d9e5a
Add system tag assignability check with groups
Whenever a user is not an admin, a tag is visible but not
user-assignable, check whether the user is a member of the allowed
groups.
2016-05-20 17:56:02 +02:00
Vincent Petry 3cd65fe25d
Add systemtag_group table and get/set methods
Added systemtag to group mapping table.
Added methods in ISystemTagManager to get/set the group mappings.
2016-05-20 17:56:02 +02:00
Vincent Petry 09b3883d9c
Updated canUser* functions in SystemTagManager to accept objects 2016-05-20 17:56:02 +02:00
Vincent Petry 8343cfb64b
Add interface methods for permission check
Instead of checking for admin perm, use interface method
canUserAssignTag and canUserSeeTag to check for permissions.
Allows for more flexible implementation.
2016-05-20 17:56:02 +02:00
Roeland Jago Douma 54b637e83c
Fix unit tests 2016-05-20 16:35:07 +02:00
Joas Schilling 94ad54ec9b Move tests/ to PSR-4 (#24731)
* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
2016-05-20 15:38:20 +02:00
Vincent Petry e8d082208d
Fixes for encoding wrapper
Improved label
Fixed rename/copy/moveFromStorage/copyFromStorage and added tests
Improved findPathToUse algo
2016-05-20 09:33:59 +02:00
Vincent Petry 63bbbf29f4
Add wrapper for NFD encoding workaround 2016-05-20 09:33:59 +02:00
Vincent Petry b495895017 Merge pull request #24728 from owncloud/no-more-test_-files
Fix autoloader for Test* files
2016-05-20 09:29:01 +02:00
Joas Schilling 54250ed065
Add PSR-4 loading for Test\ and Tests\ 2016-05-19 15:49:27 +02:00
Joas Schilling f8180391fd
Create a Fallback in the old autoloader for PSR-4 Test\TestCase 2016-05-19 15:45:34 +02:00
Joas Schilling ffa4633822
No more Test_* files exist, remove autoloading 2016-05-19 15:38:16 +02:00
Vincent Petry f42cdec4c4 Merge pull request #24725 from owncloud/ocs-provider-psr4
Move OCS Provider to PSR-4 namespace
2016-05-19 15:36:19 +02:00
Vincent Petry 3b3940df6b Merge pull request #24660 from owncloud/no-token-login-for-disabled-users
don't allow token login for disabled users
2016-05-19 15:32:09 +02:00
Vincent Petry 61b3260ebd Merge pull request #24716 from owncloud/fix-test-namespaces-2
Fix test namespaces [files-]
2016-05-19 15:31:43 +02:00
Joas Schilling c58d174616
Move tests/settings to PSR-4 2016-05-19 11:18:25 +02:00
Joas Schilling 392bc0c6b9
Move tests/core/ to PSR-4 2016-05-19 11:18:25 +02:00
Joas Schilling 20f229eed9
Move OCS Provider to PSR-4 namespace 2016-05-19 11:10:32 +02:00
Joas Schilling bae4118b4f
Fix renamed class 2016-05-19 10:33:12 +02:00
Vincent Petry e36a27d21c Merge pull request #24712 from owncloud/fix-test-namespaces
Fix test namespaces [a-e]
2016-05-19 10:30:07 +02:00
Joas Schilling 320b1c3abf
Fix more failures 2016-05-19 10:11:42 +02:00
Joas Schilling f24179a327
Fix deprecated private method 2016-05-19 09:44:53 +02:00
Joas Schilling e88a9b2fed
Fix missing backtick before OC 2016-05-19 09:41:45 +02:00
Joas Schilling e823d50044
Fix "Class 'Test\Security\DateTime' not found" 2016-05-19 09:40:34 +02:00
Joas Schilling 9a4253ef7c
Fix lib/ 2016-05-19 09:38:52 +02:00
Joas Schilling 55fc6536d3
FIx lib/ a-d 2016-05-19 09:27:21 +02:00
Joas Schilling 7f3f16d155
Fix namespace in user/ 2016-05-19 09:19:03 +02:00
Joas Schilling a107e7de7b
Fix namespace in share/ 2016-05-19 09:15:10 +02:00
Joas Schilling 68481c10e6
Fix namespaces in security/ 2016-05-19 09:02:58 +02:00
Joas Schilling a9f24a74a2
Fix namespace in repair/ 2016-05-19 08:59:37 +02:00
Joas Schilling d19d6533dd
Fix public/ namespace in tests 2016-05-19 08:56:47 +02:00
Joas Schilling 859d2bc0ff
Fix namespace of memcache/ and ocs/ 2016-05-19 08:53:06 +02:00
Joas Schilling 71603fe348
Fix namespace in log/ and mail/ 2016-05-19 08:50:14 +02:00
Joas Schilling 0ab1120a33
Fix namespaces in tests/lib/integritycheck 2016-05-19 08:48:22 +02:00
Joas Schilling 51db410e67
Fix namespaces in tests/lib/http/ 2016-05-19 08:46:58 +02:00
Joas Schilling 995d4b7ecd
Fix namespaces in tests/lib/groups/ 2016-05-19 08:44:41 +02:00
Joas Schilling b1458d590d
Fix namespaces and class names in tests/lib/files/ 2016-05-19 08:41:01 +02:00
Christoph Wurst f824f3e5f3
don't allow token login for disabled users 2016-05-18 21:10:37 +02:00
Joas Schilling f57407e73e
Fix file name in tests/lib/encryption 2016-05-18 18:57:46 +02:00
Joas Schilling ba230888c6
Fix filenames and class names in tests/lib/comments 2016-05-18 18:57:46 +02:00
Joas Schilling bbf758b1b0
Fix file name of command test 2016-05-18 18:57:46 +02:00
Joas Schilling 1b6cd583f7
Fix namespace of tests/cache/ 2016-05-18 18:57:46 +02:00
Joas Schilling c54d79947b
Fix missing namespaces in tests/lib/db/ 2016-05-18 18:57:45 +02:00
Joas Schilling 5ce5eb195a
Fix namespace for archive tests 2016-05-18 18:57:45 +02:00
Joas Schilling 9eade36ae5
Fix namespaces in AppFramework tests 2016-05-18 18:57:45 +02:00
Christoph Wurst 0626578739
add method to query all user auth tokens 2016-05-18 18:25:37 +02:00
Christoph Wurst 98b465a8b9
a single token provider suffices 2016-05-18 09:20:48 +02:00
Roeland Douma 5c9103287f Group fixup (#24621)
* Move used OC_Group_xx to \OC\Group

* Add (deprecated) legacy wrapper in legacy, OC_Group_xx

* Replace deprecated use of OC_Group_xx with \OC\Group\xx
2016-05-17 16:06:44 +02:00
Vincent Petry e383a9506d Merge pull request #24617 from owncloud/autoloader_no_private
our autoloader should not load classes in \OC
2016-05-13 17:30:10 +02:00
Vincent Petry 9ac763a640 Merge pull request #24594 from owncloud/authtoken-name-column-size
Use CLOB for auth token names to allow long user agent strings
2016-05-13 11:56:52 +02:00
Roeland Jago Douma d022b6fad4
Fix unit tests 2016-05-13 11:33:21 +02:00
Roeland Jago Douma eb79b83831
Move functions.php to legacy
This file should really be properly namespaced etc!
2016-05-13 08:54:07 +02:00
Christoph Wurst c28e462583
Use CLOB for auth token names to allow long user agent strings 2016-05-12 11:19:17 +02:00
Lukas Reschke ee0ebd192a Use proper URL generation function (#24576)
Fixes the redirection after login, otherwise `core/files/index` is opened which fails.
2016-05-11 19:39:57 +02:00
Thomas Müller 8729415880 Merge pull request #24531 from owncloud/psr4-loading-for-install-and-commands
Correctly register PSR-4 autoloading before install.php and loading commands
2016-05-11 13:53:16 +02:00
Christoph Wurst 0486d750aa
use the UID for creating the session token, not the login name 2016-05-11 13:36:46 +02:00
Christoph Wurst 69dafd727d
delete the token in case an exception is thrown when decrypting the password 2016-05-11 13:36:46 +02:00
Christoph Wurst af707fba41
use the query builder instead of raw sql statements 2016-05-11 13:36:46 +02:00
Christoph Wurst 46bdf6ea2b
fix PHPDoc and other minor issues 2016-05-11 13:36:46 +02:00
Christoph Wurst f0f8bdd495
PHPDoc and other minor fixes 2016-05-11 13:36:46 +02:00
Christoph Wurst dff108e97b
fix mock builder for old phpunit versions 2016-05-11 13:36:46 +02:00
Christoph Wurst fbb5768587
add unit tests for all new classes 2016-05-11 13:36:46 +02:00
Christoph Wurst aa85edd224
increase token column width
add some range to time() assertions
2016-05-11 13:36:46 +02:00
Christoph Wurst 8cc5f6036f
Fix existing tests 2016-05-11 13:36:46 +02:00
Christoph Wurst aafd660b97
fix LoginController unit tests 2016-05-11 13:36:46 +02:00
Joas Schilling db16dc6644
Correctly register autoloading before install.php and loading commands 2016-05-11 11:18:00 +02:00
Roeland Jago Douma f6ee738ba8
Add \OC\User\Backend
Since some apps (ldap et al) still depend on OC_User_Backend this seemed
like the cleanest approach.
2016-05-10 19:53:36 +02:00
Roeland Jago Douma 9e1d9871a8
Move OC_User_Database to \OC\User\Database 2016-05-10 19:53:36 +02:00
Lukas Reschke e8e72aa910 Merge pull request #24434 from owncloud/permalinks
Permalinks
2016-05-10 09:44:50 +02:00
Lukas Reschke 8b428d84c0
Make update server URL configurable
Currently testing the updates is a big problem and not really super easy possible. Since we now have a new updater server we should also make this configurable so that people can properly test updates.
2016-05-09 11:25:58 +02:00
Roeland Jago Douma 108bd26856
Fix unit tests broken after #24457
Timeout was increased but tests were not updated.
2016-05-09 08:54:30 +02:00
Vincent Petry caefe23bb6
Send permalink in internal share notification emails 2016-05-06 16:46:59 +02:00
Morris Jobke 873849e843 Merge pull request #24432 from owncloud/issue-24270-never-save-app-language-into-request-lang
Do not save the language as request lang for apps when we didn't find…
2016-05-04 13:47:08 +02:00
Joas Schilling 9fbb8ce302
Do not save the language as request lang for apps when we didn't find any 2016-05-04 08:28:13 +02:00
Thomas Müller 4b2544925f Merge pull request #23844 from owncloud/disable-user
Add occ commands to enable and disable a user + a disabled user can n…
2016-05-03 15:22:41 +02:00
Thomas Müller f8c04a4219 Merge pull request #24392 from owncloud/declare-cron-jobs-in-info.xml
Declare cron jobs in info.xml
2016-05-03 12:03:28 +02:00
Thomas Müller 71fa0a75bf
Allow declaration of background jobs in info.xml 2016-05-03 08:58:12 +02:00
Roeland Jago Douma fc82047e26
Move OC_Log_xx to \OC\Log namespace 2016-05-03 08:57:26 +02:00
Lukas Reschke adf7e7295e Merge pull request #24375 from owncloud/archive_move
Move OC_Archive to \OC\Archive and PSR-4
2016-05-03 08:37:01 +02:00
Roeland Douma c87bd0432a Merge pull request #24380 from owncloud/move-activity-manager-to-namespace
Move activity manager to the namespace
2016-05-03 07:40:04 +02:00
Roeland Jago Douma 0cb434686c
Move OC_Archive_XX to PSR-4
* Fix code
* Fix tests
2016-05-02 19:32:51 +02:00
Thomas Müller 05cf552f66 Merge pull request #24322 from owncloud/install-and-uninstall-repair-steps
Adding repair steps for install and uninstall
2016-05-02 17:50:29 +02:00
Roeland Douma b84825f030 Merge pull request #24229 from owncloud/session-id-wrapper
add ISession::getId() wrapper for session_id
2016-05-02 16:49:38 +02:00
Joas Schilling 7bfc617b03
Move activity manager to the namespace 2016-05-02 11:57:24 +02:00
Joas Schilling 3397e27657
Remove the password from the validateUserPass() method as well 2016-05-02 10:44:09 +02:00
Thomas Müller 9c9fec36dd
Add occ commands to enable and disable a user + a disabled user can no longer login - fixes #23838 2016-05-02 09:31:22 +02:00
Thomas Müller e049953d1a
OC_Installer -> \OC\Installer 2016-05-02 08:52:06 +02:00
Thomas Müller 54f45f95f5
Adding repair steps for install and uninstall - fixes #24306 2016-05-02 08:52:06 +02:00
Thomas Müller e59ccc5fe9 Merge pull request #24299 from owncloud/availability-avoid-concurrency
Prevent concurrent storage availability checks
2016-04-29 17:43:31 +02:00
Thomas Müller 66ebc2ee6f Merge pull request #24337 from owncloud/add-db-group-for-required-tests
Add the DB group for preview tests that require the database
2016-04-29 15:02:27 +02:00
Vincent Petry 6571da1519 Merge pull request #24305 from owncloud/update-show-repair-step-progress
[Update] show repair step progress ...
2016-04-29 13:47:15 +02:00
Joas Schilling a85be14b62
Add the DB group for tests that require the database 2016-04-29 09:30:47 +02:00
Bernhard Posselt 4c1b55be92 allow app developers to specify the minimum int size
simplify comparison

remove additional null

fix off by 1 error
2016-04-28 22:55:15 +02:00
Thomas Müller 0e774e0fd8 Merge pull request #24274 from owncloud/async-repair-steps
Introduce background repair steps
2016-04-28 14:11:43 +02:00
Thomas Müller bbd2a07525
Remove emitter from class Repair 2016-04-28 13:52:01 +02:00
Robin McCorkell 77cec29b10 Prevent concurrent availability checks 2016-04-26 22:30:09 +01:00
Lukas Reschke ddbebe91f0 Merge pull request #24246 from owncloud/local-invalid
error out if a local storage isn't setup correctly
2016-04-26 20:57:56 +02:00
Robin Appelman 2f01c83a01 add tests 2016-04-26 16:08:52 +02:00
Christoph Wurst e93bf80b29
throw SessionNotAvailableException if session_id returns empty string 2016-04-26 14:51:21 +02:00
Thomas Müller 2ee7d2485c
Introduce background repair steps 2016-04-26 11:56:56 +02:00
Morris Jobke 23e7ad7a78 Merge pull request #24256 from owncloud/scanner-propagate
triger the propagator from the command line scanner
2016-04-26 10:05:39 +02:00
Robin Appelman 61054df36d triger the propagator from the command line scanner 2016-04-25 17:23:48 +02:00
Thomas Müller c7542c02db
Introduce OCP\Migration\IRepairStep and adopt all repair steps to this new interface - refs #24198 2016-04-25 15:01:13 +02:00
Christoph Wurst 0d53e86421
add ISession::getId() wrapper for session_id 2016-04-25 10:36:24 +02:00
Thomas Müller 8c7c713e86 Merge pull request #24187 from owncloud/fs-initmountpoint-rethrowifusernotfoundagain
Mark $usersSetup only if user was found in initMountPoints
2016-04-22 17:25:40 +02:00
Roeland Jago Douma 4eebccd81f
Fix inconsistent nameing of AppFramework 2016-04-22 16:00:00 +02:00
Thomas Müller cc4efc4c03 Merge pull request #24085 from owncloud/feedback-on-app-migrations
App migration steps need to push feedback to the user ....
2016-04-22 14:39:11 +02:00
Vincent Petry 13c01e62cf
Mark $usersSetup only if user was found in initMountPoints
initMountPoints is marking a user as successfully initialized too
early. If the user was not found an NoUserException was thrown, the
second time initMountPoints is called would not rethrow the exception
and happily continue.

This fix makes sure that we consistently throw NoUserException when
initMountPoints is called repeatedly with invalid users.
2016-04-22 14:29:41 +02:00
Thomas Müller 43323b0062 Merge pull request #24183 from owncloud/change-background-job-sort-order
Change the sort order of background jobs to be DESC instead of ASC
2016-04-22 13:33:54 +02:00
Vincent Petry 085bcd7da2
Throw NoUserException when attempting to init mount point for null user
In some scenarios initMountPoints is called with an empty user, and
also there is no user in the session.

In such cases, it is unsafe to let the code move on with an empty user.
2016-04-22 11:46:33 +02:00
Joas Schilling 04cee6a7db
Change the sort order of background jobs to be DESC instead of ASC
In theory, if your instance ever creates more jobs then your system cron can
handle, the default background jobs get never executed anymore. Because
everytime when the joblist returns the next job it looks for the next ID,
however there is always a new next ID, so it will never wrap back to execute
the low IDs. But when we change the sort order to be DESC, we make sure that
these low IDs are always executed, before the system jumps back up to
execute the new IDs.
2016-04-22 10:49:55 +02:00
Thomas Müller d0030aad6c
Remove deprecated HTTPHelper from InfoParser 2016-04-22 08:38:41 +02:00
Lukas Reschke 06a4da43ec
[master] Ignore certificate file if it starts with file:// 2016-04-21 19:02:31 +02:00
Vincent Petry b50d3255fb Merge pull request #22791 from owncloud/enc_master_key_improvements
Enc master key improvements
2016-04-21 11:48:26 +02:00
Thomas Müller cd01c440a0 Merge pull request #23919 from owncloud/cyclyc-share-dep-example
SharedStorage to new sharing code + cleanup
2016-04-20 20:37:27 +02:00
Thomas Müller cdcabbd0b3 Merge pull request #24098 from owncloud/fix_23782
When calling file_put_contents clear the checksum
2016-04-20 20:37:01 +02:00
Thomas Müller aa33ab0c03 Merge pull request #24094 from owncloud/move_dummy_group_backend_to_test
Move the group dummy backend to test
2016-04-20 11:55:00 +02:00
Roeland Jago Douma 0dbcbc4cae
When the scanner detects a file is changed clear checksum
Fixes #23782 and #23783

If the file scanner detects a changed file we clear the checksum while
we update the cache.

* Unit test added
2016-04-19 20:20:45 +02:00
Thomas Müller 5b2ef92eb2 Merge pull request #24004 from owncloud/dont-transfer-files-to-not-ready-user
Introduce isReadyForUser and verify in file transfer ownership
2016-04-19 15:56:47 +02:00
Roeland Jago Douma dd7e0d13e5
Move the group dummy backend to test
The dummy backend is only used for testing and should thus reside in
tests.
2016-04-19 15:13:31 +02:00
Roeland Douma 0c5f915377 Merge pull request #24054 from owncloud/data_fingerprint
Add data-fingerprint property
2016-04-19 14:24:27 +02:00
Roeland Jago Douma 92abb5f23d
Fix tests 2016-04-19 14:04:00 +02:00
Thomas Müller 1773dcbef2 Merge pull request #23973 from owncloud/share_move_post_delete_from_group_hook
Move post_removeFromGroup to shareManager
2016-04-19 06:59:58 +02:00
Lukas Reschke 8222ad5157
Move logout to controller
Testable code. Yay.
2016-04-18 21:21:52 +02:00
Thomas Müller 1626850fc9
Remove deprecated HTTPHelper 2016-04-18 17:28:10 +02:00
Thomas Müller 5c3183cedd
Move version check code out of class Updater 2016-04-18 17:12:59 +02:00
Roeland Jago Douma a2c8597b00
Add occ command for updating the data-fingerprint 2016-04-18 16:08:19 +02:00
Lukas Reschke fee95084ae
Rename `username` to `loginName`
UID and login name are two different things.
2016-04-15 19:02:19 +02:00
Lukas Reschke 8a650a51be
Use !== instead of empty
Users can be named null
2016-04-15 18:57:11 +02:00
Lukas Reschke 331e4efacb
Move login form into controller
First step on getting the authorisation stuff cleaned up. This is only for the login form, all other stuff is still where it is.
2016-04-15 17:36:23 +02:00
Thomas Müller 50e20e531e
Introduce isReadyForUser and verify in file transfer ownership - fixes #23786 2016-04-15 15:07:40 +02:00
Robin McCorkell 4717605d22 Fix storage backend class namespaces and move to subdir
All classes that were previously \OC\Files\Storage\FooBar are now
\OCA\Files_External\Lib\Storage\FooBar
2016-04-14 00:44:28 +01:00
Roeland Jago Douma 6144ced7a0
Move post_removeFromGroup to shareManager
The last sharing hook to be moved over.

* Added unit tests
* Removed old tests that relied on old behaviour
* Removed old hooks.php
2016-04-13 15:00:12 +02:00
Thomas Müller e90a3b5ba7 Merge pull request #23954 from stweil/master
misc: Fix some typos
2016-04-13 11:08:58 +02:00
Lukas Reschke ef93ec8bc2
Add test 2016-04-12 21:32:40 +02:00
Stefan Weil ee5f5eebe5 misc: Fix some typos
Some of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-12 18:36:39 +02:00
Thomas Müller fdee771aca Add unit testing capabilities for templates (#23708)
Add unit testing capabilities for templates
2016-04-12 12:49:11 +02:00
Roeland Douma 495a964ca2 Migrate post_groupDelete hook to share manager (#23841)
The hook now calls the share manager that will call the responsible
shareProvider to do the proper cleanup.

* Unit tests added

Again nothing should change it is just to cleanup old code
2016-04-12 09:46:25 +02:00
Joas Schilling 8e16e7bf34 Merge pull request #23856 from owncloud/share_remove_addtogroup_hooks
Remove pre/post_addToGroup hooks for shares
2016-04-11 15:05:20 +02:00
Roeland Jago Douma 2a0244df27
Fix mappertest 2016-04-08 15:23:09 +02:00
Roeland Jago Douma f9ade49c7e
Fix notification tests 2016-04-08 15:23:06 +02:00
Roeland Jago Douma b9b19cef41
Fix avatar controller tests 2016-04-08 15:23:00 +02:00
Roeland Jago Douma e65e7a5ad7
Fix ShareManager tests 2016-04-08 15:22:57 +02:00
Thomas Müller 1d3d43b1e9 Merge pull request #23553 from owncloud/lock-ttl-execution-time
Make lock ttl configurable
2016-04-08 14:53:26 +02:00
Roeland Jago Douma bd3bde2f3b
Set proper permissions on link share
If we do not allow public upload we should limit the permissions on
links shares upon retrieval.

* Added unit test
* Allow fetching federated shares by token as well
2016-04-08 14:17:05 +02:00
Roeland Jago Douma 3fae4c82d2
Remove pre/post_addToGroup hooks for shares
There is no need to perform the checks for unique targets on add to
group as we have to do this all when mounting the shares anyway.
2016-04-08 11:56:38 +02:00
Joas Schilling 0de15a86f0 Merge pull request #23773 from owncloud/share_move_delete_user_hook
Migrate post_userDelete hook to share manager
2016-04-07 13:01:10 +02:00
Robin Appelman cdedda99e4 Make lock ttl configurable 2016-04-07 08:24:13 +02:00
Stefan Weil 02e226a6b3 tests: Fix typos (found by codespell)
Fix also a small grammar issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-06 15:08:27 +02:00
Thomas Müller 56ab04f11e Merge pull request #23823 from owncloud/drop-js-based-acceptance-tests
Drop JS based acceptance tests - we have our behat based integration …
2016-04-06 14:17:08 +02:00
Roeland Douma 93b1768eb7 Merge pull request #23819 from owncloud/move-core-completely-to-psr4
Move OC/Core completely to PSR-4
2016-04-06 13:31:44 +02:00
Thomas Müller e515061ee7 Drop JS based acceptance tests - we have our behat based integration tests which are activly maintained 2016-04-06 12:28:23 +02:00
Lukas Reschke 5a0c936f99
Remove OC/Settings from old autoloader 2016-04-06 11:34:53 +02:00
Lukas Reschke c952adabb5
Remove OC/Core autoloading from old autoloader 2016-04-06 11:34:29 +02:00
Jörn Friedrich Dreyer 4445ef82e0 Test locking with strange filename 2016-04-05 16:13:28 +02:00
Roeland Jago Douma e0cee43cf0 Migrate post_userDelete hook to share manager
This makes the post_userDelete hook call the sharemanager. This will
cleanup to and from this user.

* All shares owned by this user
* All shares with this user (user)
* All custom group shares
* All link share initiated by this user (to avoid invisible link shares)

Unit tests are added for the defaultshare provider as well as the
federated share provider
2016-04-04 14:15:38 +02:00
Frank Karlitschek 2bff34be56 Merge pull request #23707 from owncloud/make-sure-that-encrypted-version-is-set
Make sure that the encrypted version is set
2016-03-31 20:37:17 +02:00
Frank Karlitschek fdb59079a2 Merge pull request #23675 from owncloud/fix_encryption_versions_on_external_storages
fix creation of versions of encrypted files on external storages
2016-03-31 20:36:03 +02:00
Bjoern Schiessle 93ed965cbb fix creation of versions of encrypted files on external storages
in order to create a 1:1 copy of a file if a version gets created
we need to store this information on copyBetweenStorage(). This
allows us to by-pass the encryption wrapper if we read the source file.
2016-03-31 19:24:47 +02:00
Lukas Reschke c427bf3b5d Make sure that the encrypted version is set
The code path called when using external storage with WebDAV is using `\OC\Files\Storage\Wrapper\Encryption::getMetaData` which did not contain the actual encrypted version inside the cache entry version. This lead to the following:

1. User uploaded a file
2. File is created and `\OC\Files\Storage\Wrapper\Encryption::getMetaData` is called. It has an empty `encryptedVersion` but sets `encrypted` to either `true` or `false`.
3. The call when updating the file cache will use the old version.
2016-03-31 18:06:37 +02:00
Roeland Jago Douma 8da48a4482 Add unit tests
Add some unit tests for setting the internal id and the provider id
2016-03-30 23:08:35 +02:00
Roeland Jago Douma 2f4294e781 Add setId and setProviderID to the public interface
Fixes #23337

We only allow the id to be set once!
2016-03-30 22:55:03 +02:00
Thomas Müller 66ee9d56fc Merge pull request #23628 from owncloud/avatar-remove
only remove avatars from the folder we store them in
2016-03-30 17:00:09 +02:00
Roeland Jago Douma 9ce5e4b01f Non moveable mount points should always be UPDATE+DELETE shareable
Fixes #23536

The new sharing code is much stricter in checking permissions. However
for non moveable mounts the permissions UPDATE+DELETE are not reported
on the mount point.

This is just a quick fix.

* Updated unit tests
2016-03-30 13:33:16 +02:00
Robin Appelman c22697e09e only remove avatars from the folder we store them in 2016-03-30 10:24:43 +02:00
Thomas Müller b8812c8cba Merge pull request #23154 from owncloud/avatar-save-failure
dont die when we cant save the resized avatar, log instead
2016-03-24 22:43:17 +01:00
Thomas Müller ea07a428f4 Merge pull request #22506 from owncloud/node-get-from-cache
Query the cache when checking if a node exists
2016-03-23 13:08:17 +01:00
Thomas Müller fc18d33ff8 Merge pull request #22895 from owncloud/cleanup_default_share_provider
Remove support for old shares in the default share provider
2016-03-23 11:02:28 +01:00
Thomas Müller efd378814c Merge pull request #23362 from owncloud/fix-l10n-for-themes
Read available l10n files also from theme folder
2016-03-23 09:22:21 +01:00
Roeland Jago Douma b26b8d17eb Remove support for old shares in the default share provider
In 9.0 we converted the old shares to the new shares. So for 9.1 we can
savely remove the fallback code.

This code was required when there was no initiator set.

* Fixed unit tests
2016-03-23 07:58:17 +01:00
Roeland Jago Douma 52826d0e24 Block group sharing in API and in share manager
* Fix tests
2016-03-22 17:13:34 +01:00
Joas Schilling dcca20a48a Save the query when we get tags for no objects 2016-03-22 11:13:11 +01:00
Robin Appelman 0b0b3253bb properly use fileinfo objects 2016-03-21 14:20:33 +01:00
Robin Appelman 5e6c905a14 pass the fileinfo to the node if available 2016-03-21 13:53:33 +01:00
Morris Jobke 76455204c0 Inject server root - allows proper testing and separation of concerns 2016-03-18 13:59:44 +01:00
Bjoern Schiessle 5e267589d4 only create and update user specific key if no master key is enabled 2016-03-18 11:06:14 +01:00
Morris Jobke 23c0f4ff5f Read available l10n files also from theme folder
The old behaviour was that only languages could be used for an app
that are already present in the apps/$app/l10n folder. If there is
a themed l10n that is not present in the apps default l10n folder
the language could not be used and the texts are not translated.

With this change this is possible and also the l10n files are
loaded even if the default l10n doesn't contain the l10n file.
2016-03-17 16:15:37 +01:00
Lukas Reschke 676041ba7e Ensure that stored version is at least 1 for cross-storage copy
In case of a move operation from an unencrypted to an encrypted
storage the old encrypted version would stay with "0" while the
correct value would be "1". Thus we manually set the value to "1"
for those cases.

See also https://github.com/owncloud/core/issues/23078
2016-03-16 10:36:15 +01:00
Thomas Müller f7140294f2 Merge pull request #23157 from owncloud/remove-share-prop-entries
remove old share propagation entries from appconfig
2016-03-15 16:04:17 +01:00
Thomas Müller 27760ae54e Merge pull request #23164 from owncloud/db-connection-precondition-fix
Prevent certain DBs throwing exceptions on same-value updates
2016-03-15 16:03:55 +01:00
Thomas Müller 7b06dd485d Merge pull request #23250 from owncloud/fix-support-for-php7-in-htaccess
Fix several .htaccess and .user.ini related problems
2016-03-15 16:03:18 +01:00
Robin McCorkell 1b2f1cc272 Prevent certain DBs throwing exceptions on same-value updates
A PreconditionNotMetException must only be thrown if explicit
preconditions are specified for setValues(), not if the value is merely
the same as was already in the DB.
2016-03-15 13:02:19 +01:00
Robin Appelman 0aa83511a1 remove old share propagation entries from appconfig 2016-03-15 12:50:22 +01:00
Roeland Jago Douma 1db82073a4 Generate a valid URL for link notification
fixes #23197

* Updated unit test
2016-03-15 11:10:24 +01:00
Lukas Reschke 5278bfe0e4 Add support for custom values in integrity checker 2016-03-15 10:41:17 +01:00
Joas Schilling 2f67aa9bc4 Fix errors in memcached implementation 2016-03-14 12:39:34 +01:00
Robin Appelman 54e750ba78 dont die when we cant save the resized avatar, log instead 2016-03-11 13:44:35 +01:00
Lukas Reschke dc6789fd5b Explicitly check for port
The setup uses `\OCP\IRequest::getInsecureServerHost` which in some cases can also include a port. This makes the trusted domain check fail thus.

I've decided to add this here that way because adjusting the setup would require parsing the host properly. This is not something that can be done very good in PHP. Check the following example for why `parse_url` is not our friend: https://3v4l.org/k501Z
2016-03-10 22:32:29 +01:00
Thomas Müller 262ec35d50 Merge pull request #23017 from owncloud/first-stop-the-dockers
docker containers should be stopped before being removed - refs https…
2016-03-10 10:58:20 +01:00
Thomas Müller cf3cb4d75e docker containers should be stopped before being removed - refs https://github.com/docker/docker/issues/18758 2016-03-09 14:02:08 +01:00
Roeland Jago Douma 7301b43eb6 Added tests
* Unit tests for OC_Filechunking to verify the isComplete function
* Intergration tests to show that shuffling chunks is all fine
2016-03-07 21:20:13 +01:00
Lukas Reschke 72c8187cbb Keep "encryptedVersion" when calling `\OC\Files\View::copy`
When calling `\OC\Files\View::copy` we should also keep the version to ensure that the file will always have the correct version attached and can be successfully decrypted.

To test this the following steps are necessary (from https://github.com/owncloud/core/issues/22781#issuecomment-191328982):

1. setup a new ownCloud 9.0 beta2
2. enable encryption
2. upload a docx (5.7MB large)
3. upload the same file again and overwrite the existing file
4. I can download the original file and the first version
5. I restore the first version
6. restored version can no longer be downloaded with the error described above

The manual cache operation in `\OCA\Files_Versions\Storage` is unfortunately necessary since `\OCA\Files_Versions\Storage::copyFileContents` is not using `\OCP\Files\Storage::moveFromStorage` in the case when an object storage is used. Due to the workaround added in 54cea05271 the stream is directly copied and thus bypassing the FS.
2016-03-03 14:15:36 +01:00
C. Montero Luque 745fdc4800 Merge pull request #22742 from owncloud/ceph-keystone-readiness
Use readiness notification socket to be absolutely sure this works
2016-03-01 13:34:23 -05:00
Morris Jobke 3682a4220c local entrypoint.sh isn't needed - all fixes are upstream 2016-03-01 13:54:46 +01:00
Morris Jobke 4943a0326d Use sockets for startup notification in primary storage tests 2016-03-01 10:45:48 +01:00
Joas Schilling 2a0cda74d4 Use IQueryBuilder::PARAM_* instead of \PDO::PARAM_* 2016-02-29 09:44:40 +01:00
Thomas Müller 6526c122af Merge pull request #22683 from owncloud/fix_22682
Relax rootfolder check
2016-02-29 08:53:58 +01:00
Roeland Jago Douma b116e80c56 Relax rootfolder check
* Updated unit tests
* Added intergration test
2016-02-26 16:05:32 +01:00
Roeland Jago Douma bfcdf40a64 Expiration date can only be enforced if default is enabled
If the default expiration date is not enebaled it can not be enforced.

* Added unit tests
2016-02-26 11:38:06 +01:00
Thomas Müller 62d7885c3b Merge pull request #22660 from owncloud/fix_22656
Do not allow sharing of the users root folder
2016-02-26 10:49:12 +01:00
Thomas Müller 0795cc373d Merge pull request #22646 from owncloud/fix_22642
Set default expiration date if none given on share creation
2016-02-26 10:48:21 +01:00
Thomas Müller cbde4bb92f Merge pull request #22650 from owncloud/fix_hook
Fix verifyExpirationDate passwordSet argument
2016-02-26 09:32:41 +01:00
Roeland Jago Douma 8213d5df4f Do not allow sharing of the root folder
Sharing of the users root folder should not be allowed as it is very
weird UX. Also many of our clients have no proper way of displaying
this.

Added unit test

Also added intergration tests to make sure we won't allow it in the
future.
2016-02-25 20:40:30 +01:00
Lukas Reschke 0e19c6a3a0 Fix formatting of response
The elements are expected to be within a `service` array as per specification.
2016-02-25 19:05:05 +01:00
Roeland Jago Douma 9412f69104 Fix verifyExpirationDate passwordSet argument
Password set should be false if the password is null.

Also updated the unit tests to tests this now.
2016-02-25 15:39:02 +01:00
Thomas Müller efc966698f Merge pull request #22579 from owncloud/fix_broken_unencrypted_size
Heal unencrypted file sizes at download time (second approach)
2016-02-25 14:34:48 +01:00
Roeland Jago Douma 6d4f80d680 Set default expiration date if none given on share creation
When we create a share for the first time we should set the default
expiration date. If none is given.

Fixes #22642
2016-02-25 14:21:46 +01:00
Thomas Müller 2ec1c738d0 Merge pull request #22573 from owncloud/issue-22568-allow-string-object-ids
Make sure we can store strings as per the interface
2016-02-24 12:15:23 +01:00
Bjoern Schiessle 834b51b83b recalculate unencrypted size if we assume that the size stored in the db is not correct 2016-02-23 15:09:46 +01:00
Thomas Müller 9a0950f10b Merge pull request #22569 from owncloud/issue-22566-too-much-mapping-entries
Allow defining a limit and offset for getObjectIdsForTags
2016-02-23 15:02:08 +01:00
Thomas Müller 59acc53483 Merge pull request #22551 from owncloud/make-exceptions-easier-to-debug
Throw normal exceptions instead of eating them
2016-02-23 10:23:03 +01:00
Joas Schilling fb8b34bdd0 Allow defining a limit and offset for getObjectIdsForTags 2016-02-23 09:04:15 +01:00
Joas Schilling 24c7f38a00 Make sure we can store strings as per the interface 2016-02-22 15:43:20 +01:00
Roeland Jago Douma fe08b5e9d9 We should check for exceptions when trying to get the avatar
Fixes #22550

* Updated phpdoc of avatatmanager
* Add unit test
2016-02-22 10:14:14 +01:00
Lukas Reschke 6c96b3d07f Throw normal exceptions instead of eating them
Partially addresses https://github.com/owncloud/core/issues/22550

Replaces https://github.com/owncloud/core/pull/20185
2016-02-22 09:41:56 +01:00
Thomas Müller f8677628d4 Merge pull request #22503 from owncloud/issue_22500
When (re-)sharing an incomming federated share set the corrent owner
2016-02-19 16:07:43 +01:00
Thomas Müller b5281b61ed Merge pull request #22410 from owncloud/fix_22119
Do not copy skeleton on avatar access
2016-02-19 16:06:40 +01:00
Roeland Jago Douma 2dcf887cce When (re-)sharing an incomming federated share set the corrent owner
Incomming federated shares are a special kind. We mount them as normal
webdav shares but we do supply owner info with the federated cloud id of
the share owner.

Since we do not yet have the new resharing behaviour on federated shares
we need to set the correct owner. Which will allow sharing and proper
mounting for other users.

fixes #22500
2016-02-19 12:43:03 +01:00
v1r0x ec6e8c1ab6 fix unit test 2016-02-18 12:39:19 +01:00
Thomas Müller 4b376305e9 Fix coverage reporting 2016-02-16 14:21:28 +01:00
Thomas Müller c6fef52939 Merge pull request #22416 from owncloud/fix_22402
Return proper error string if sharing for this user is disabled
2016-02-16 13:37:22 +01:00
Thomas Müller d5226c88ac Merge pull request #22338 from owncloud/fix_22247
Allow more characters in filenames
2016-02-16 13:37:07 +01:00
Roeland Jago Douma ed6843e87b Return proper error string if sharing for this user is disabled
Fixes #22402
2016-02-16 10:22:49 +01:00
Roeland Jago Douma 47d28155a8 Do not copy skeleton on avatar access
Fixes #22119

Just try to get the folder of the user. If it is not there a
NotFoundException will be thrown. Which will be handled by the avatar
endpoint.
2016-02-16 09:18:38 +01:00
Morris Jobke 7048d428b1 Remove unneeded parameter from OC_App::getEnabledApps 2016-02-15 13:33:07 +01:00
Thomas Müller 198d234068 Merge pull request #22345 from owncloud/make-note-if-appcodechecker-is-not-enabled
Add note if integrity check is disabled
2016-02-13 18:24:26 +01:00
Thomas Müller 248c571c56 Merge pull request #22331 from owncloud/dav-nonexisting-part
fix getNodeForPath for non existing part files
2016-02-13 18:24:00 +01:00
Lukas Reschke 4b90429178 Add note if integrity check is disabled
Our issue template states that users should post the output of `/index.php/settings/integrity/failed`, at the moment it displays that all passes have been passed if the integrity checker has been disabled.

This is however a wrong approach considering that some distributions are gonna package Frankenstein releases and makes it harder for us to detect such issues. Thus if the integrity code checker is disabled (using the config switch)  it displays now: `Appcode checker has been disabled. Integrity cannot be verified.`

This is not displayed anywhere else in the UI except these URL used for us for debugging purposes.
2016-02-12 11:11:39 +01:00
Thomas Müller 207c09c511 Merge pull request #22309 from owncloud/infinite-recursion-on-expired-link
Do not getShare in deleteShare, it's already there when deleting
2016-02-12 11:11:26 +01:00
Thomas Müller e99c4d83dc Merge pull request #22317 from owncloud/fix_invisible_linkshares
Do not allow invisible link shares
2016-02-12 11:10:58 +01:00
Roeland Jago Douma 759b19775d Fix unit tests 2016-02-12 07:49:36 +01:00
Thomas Müller fe9215adf6 Merge pull request #22314 from owncloud/fix-mariadb-autotest
Wait until mariadb is up and running
2016-02-11 18:51:58 +01:00
Robin Appelman c3e4ced64a fix getNodeForPath for non existing part files 2016-02-11 17:22:40 +01:00
Thomas Müller dfe267424f Merge pull request #22315 from owncloud/update-info-checker-requirements
Update info checker requirements
2016-02-11 14:31:47 +01:00
Thomas Müller 6b635044a7 Use official mariadb docker 2016-02-11 14:17:17 +01:00
Roeland Jago Douma 4533cb9c59 Add parent for invisible link shares 2016-02-11 13:29:23 +01:00
Joas Schilling 8cfdc62eae Update info checker requirements 2016-02-11 11:54:13 +01:00
Roeland Jago Douma 2aa206e900 Fix unit tests 2016-02-11 11:21:12 +01:00
Thomas Müller 8b165c5ed5 No longer evaluate appinfo/version 2016-02-10 17:24:14 +01:00
Björn Schießle 9bb97c714b fixing unit tests 2016-02-09 23:43:26 +01:00
Thomas Müller 29f6f451a9 Merge pull request #22192 from owncloud/fix_19685
Only set the default expiration date on share creation
2016-02-09 23:38:00 +01:00
C. Montero Luque 962d0c3290 Merge pull request #22252 from owncloud/consolidate-user-set-quota
Consolidate getQuota and setQuota methods in User instance
2016-02-09 22:00:24 +01:00
Arthur Schiwon ef7846f7bd fix tests 2016-02-09 17:37:13 +01:00
Thomas Müller 2982017682 Merge pull request #22228 from owncloud/comments-limit-message
Limit comment message to 1k chars
2016-02-09 16:35:23 +01:00
Thomas Müller a6ade67dfb Merge pull request #22197 from owncloud/files-filterbysystemtags
Add file list filter to filter by system tags
2016-02-09 13:31:00 +01:00
Roeland Jago Douma ee65cd0bd8 Only set the default expiration date on share creation
Fixes #19685

The default expiration date should only be set when we create a new
share. So if a share is created and the expiration date is unset. And
after that the password is updated the expiration date should remain
unset.
2016-02-09 11:05:14 +01:00
Vincent Petry e378a757ff Add system tags filter section for files app 2016-02-09 10:59:29 +01:00
Arthur Schiwon 347ad3e223 Limit comment message to 1k chars 2016-02-09 03:14:30 +01:00
Arthur Schiwon cd00751de5 Send events when enabling and disabling of apps 2016-02-09 02:51:12 +01:00
Roeland Jago Douma 2f6ffdbce5 Added tests for used parts 2016-02-08 11:30:48 +01:00
Roeland Jago Douma fad85ad19f Fix unit tests 2016-02-08 11:30:48 +01:00
Bjoern Schiessle 9079388e02 implementation of the federated share provider 2016-02-08 11:30:48 +01:00
Roeland Jago Douma 8486d61764 getSharesBy should also expire link shares 2016-02-06 13:31:54 +01:00
Roeland Jago Douma 3028ec5440 Delete expired share when fetched by id 2016-02-06 13:31:54 +01:00
Roeland Jago Douma 5ed56d9edb Delete a link share if it is expired on access
If we access a link share we should check if it has expired already.
If so we should remove it and throw a ShareNotFound exception
2016-02-06 13:31:54 +01:00
Thomas Müller 5832178f59 Merge pull request #22139 from owncloud/comments-files-cleanup
cleanup jobs for comments and comment read marks
2016-02-06 13:26:00 +01:00
Joas Schilling 065141f6f4 Move casting to IExpressionBuilder 2016-02-05 21:26:30 +01:00
Robin Appelman fb76d7de69 remove unused Storage->getLocalFolder 2016-02-05 16:48:08 +01:00
Roeland Jago Douma 169874957a Path should be relative 2016-02-04 19:19:10 +01:00
Roeland Jago Douma b57aac0a89 [Share 2.0] Add missing post_update_permissions hook 2016-02-04 19:18:25 +01:00
Thomas Müller d8faeab421 Merge pull request #21766 from farukuzun/master
Add some mimetypes
2016-02-04 16:49:31 +01:00
Thomas Müller 1619968a03 Merge pull request #22111 from owncloud/use-intermediate-certificate
Use intermediate root authority + sign other release channels
2016-02-04 16:17:47 +01:00
Roeland Jago Douma 0f22a8db1d Also add type (file/folder) to IShare object
We need this for the hooks :(
2016-02-04 14:28:09 +01:00
Roeland Jago Douma 2c0cb5a00e Unit test for delete lazy shares 2016-02-04 13:30:42 +01:00
Roeland Jago Douma e0bc128eb5 Add unit tests 2016-02-04 13:05:05 +01:00
Roeland Jago Douma fc215d0980 Make the share object lazy
Share providers can now just pass in a fileId. And the node will only be
created once needed.
2016-02-04 12:51:23 +01:00
Faruk Uzun 6ffd8f3e0d Introduce some mimetypes for richdocuments
* application/vnd.lotus-wordpro
* application/vnd.visio
* application/vnd.wordperfect
* application/msonenote
2016-02-04 13:48:21 +02:00
Thomas Müller b594aa18ee Merge pull request #22110 from owncloud/comment-types-always-plural
types shall always be plural
2016-02-04 10:55:49 +01:00
Thomas Müller da04620155 Merge pull request #22101 from owncloud/comments-filerow
Add file row indicator for unread comments
2016-02-03 20:53:40 +01:00
Lukas Reschke 5f300ac275 Allow specifing the signing path 2016-02-03 20:08:40 +01:00
Arthur Schiwon 9370491822 types shall always be plural 2016-02-03 19:28:15 +01:00
Roeland Jago Douma 96662c4d0d [Share 2.0] Fix shareManager 2016-02-03 19:25:29 +01:00
Roeland Jago Douma eb904c7aa9 [Share 2.0] Fix defaultshare provider 2016-02-03 19:25:29 +01:00
Vincent Petry 85bec3ffcb Reset comments read marker after loading comments 2016-02-03 16:18:14 +01:00
Thomas Müller 74abbbc0d6 Merge pull request #22098 from owncloud/cleanup-core-apps
Cleanup core apps
2016-02-03 14:17:10 +01:00
Thomas Müller aaf7299d28 Merge pull request #22070 from owncloud/share2_exceptions
Add sharing exceptions to OCP
2016-02-03 13:36:14 +01:00
Vincent Petry 8bb1437e24 Add file row indicator for unread comments 2016-02-03 13:00:55 +01:00
Joas Schilling 599eb141b4 Make sure tests don't leave a stray directory behind 2016-02-03 12:57:22 +01:00
Vincent Petry 03f4b49ecc Added JS unit tests for comments 2016-02-02 18:01:15 +01:00
Thomas Müller 0e95b9f2d5 Merge pull request #22054 from vincchan/vincchan/fix#20199
Move data protection check to javascript
2016-02-02 15:59:07 +01:00
Roeland Jago Douma dc32f49c6e [Share 2.0] Use GenericShareException 2016-02-02 14:23:45 +01:00
Roeland Jago Douma 4d7130ad31 [Share 2.0] Add exceptions to OCP 2016-02-02 14:07:11 +01:00
Thomas Müller ce053b9808 Merge pull request #22013 from owncloud/share2_moveshare
[Share 2.0] Allow moving of shares
2016-02-02 13:34:50 +01:00
Thomas Müller 2d1d89ee29 Merge pull request #22049 from owncloud/issue-22041-activities-for-systemtags
Issue 22041 activities for systemtags
2016-02-02 13:08:01 +01:00