Commit Graph

3896 Commits

Author SHA1 Message Date
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