Commit Graph

3070 Commits

Author SHA1 Message Date
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
Lukas Reschke c0bbae28f0 Merge pull request #1741 from nextcloud/new_preview
Improve previews
2016-11-03 21:07:16 +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 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
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
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 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 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
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