Commit Graph

293 Commits

Author SHA1 Message Date
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Roeland Jago Douma 4537faa5da
Merge pull request #7918 from nextcloud/properly-log-exceptions
Properly log the full exception instead of only the message
2018-01-23 11:56:02 +01:00
Morris Jobke 2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00
blizzz c7d9e5fd63
Merge pull request #7354 from nextcloud/refacor-update-page-print
Refactor method to check if update is needed
2018-01-22 22:50:05 +01:00
Morris Jobke c70927eaa0
Remove not needed 3rdparty app disabling during upgrade for PHP 5.x
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-19 14:00:27 +01:00
Morris Jobke f22e02cd79
Refactor method to check if update is needed
There was only one call, that actually needed the parameter to be set to true. So this change moved the print of the page to that location and replaces all other occurences with a direct call to the underlying OCP API.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-30 16:04:07 +01:00
Morris Jobke 0e2f00ec59
Get the Installer via DI
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-25 12:00:57 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Lukas Reschke e1f52fc901
Stricter phan config fixes
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:13 +02:00
Morris Jobke caa0ae94e8 Proper logging for appstore updates
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-11 13:35:17 -05:00
Ko- 0024b67aaf Check that set_time_limit is not disabled before calling it
Signed-off-by: Ko- <k.stoffelen@cs.ru.nl>
2017-03-11 17:04:21 +01:00
Roeland Jago Douma 02525fd98b
Move preview endpoint to controller
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:33 +01:00
Roeland Jago Douma 743132650a
Move to AppData
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:32 +01:00
Roeland Jago Douma 958c1289b1
New preview generator
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-03 14:00:32 +01: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
Joas Schilling f41c8c0089
Check if the file isReadable() before sending a (cached) preview 2016-08-29 10:58:57 +02:00
Roeland Jago Douma 532c0dd8ce
Kill ajax/share.php
Using this file will insert invalid shares.
OCS has to be used exclusively!
2016-08-18 20:56:02 +02:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Thomas Müller 821d8736c8
Adding progress to web upgrade 2016-04-28 13:52:01 +02:00
Thomas Müller 22db0f17a8 Fix web updater - fixes #24115 2016-04-20 20:32:47 +02:00
Christoph Wurst b4c5a5b9bf Merge pull request #23911 from owncloud/split-upgrade-command
Move version check code out of class Updater
2016-04-18 20:58:00 +02:00
Thomas Müller 5c3183cedd
Move version check code out of class Updater 2016-04-18 17:12:59 +02:00
Thomas Müller 739dfb5c66
Suggest cli based updater in case the instance is bigger - #23913 2016-04-18 17:09:21 +02:00
Thomas Müller 4b79fb10a2 Fix verbose output of upgrade command - not progressbar in this case and the schema migration test has one progressbar now for all tables - before we had one progressbar for each table 2016-04-04 16:20:53 +02:00
Morris Jobke 1f7e02e4d4 Add detailed logs hidden and show them on request 2016-04-04 12:34:18 +02:00
Thomas Müller 1bf4c75e8b Show individual sql schema migration steps during upgrade - on web as well as on the command line 2016-04-04 12:34:18 +02: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 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Leonardo Diez 04b5956fc8 Fix on shared groups assignment. 2016-02-18 11:22:28 +01:00
Roeland Jago Douma 5f3a91536d Remove modifying calls in ajax/share.php
Those calls used the old sharing endpoint that created incompatible
shares. Which eventually would lead to some weird bugs.
2016-02-09 09:42:06 +01:00
Morris Jobke 0a66734416 Revert "setting to skip migration tests by default" 2016-02-03 12:59:47 +01:00
Morris Jobke 2e444e6e37 setting to skip migration tests by default
* if you install owncloud via package it is not
  possible to skip migration tests
* this also allows to disable migration tests for
  an instance by default
2016-02-03 09:08:27 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Björn Schießle 58b1221ad3 don't show previous log level in upgrade message 2016-01-04 11:50:07 +01:00
Thomas Müller eebe2b9c23 User IUser::getEMailAddress() all over the place 2015-12-02 21:25:05 +01:00
Lukas Reschke 4971015544 Add code integrity check
This PR implements the base foundation of the code signing and integrity check. In this PR implemented is the signing and verification logic, as well as commands to sign single apps or the core repository.

Furthermore, there is a basic implementation to display problems with the code integrity on the update screen.

Code signing basically happens the following way:

- There is a ownCloud Root Certificate authority stored `resources/codesigning/root.crt` (in this PR I also ship the private key which we obviously need to change before a release 😉). This certificate is not intended to be used for signing directly and only is used to sign new certificates.
- Using the `integrity:sign-core` and `integrity:sign-app` commands developers can sign either the core release or a single app. The core release needs to be signed with a certificate that has a CN of `core`,  apps need to be signed with a certificate that either has a CN of `core` (shipped apps!)  or the AppID.
- The command generates a signature.json file of the following format:
```json
{
    "hashes": {
        "/filename.php": "2401fed2eea6f2c1027c482a633e8e25cd46701f811e2d2c10dc213fd95fa60e350bccbbebdccc73a042b1a2799f673fbabadc783284cc288e4f1a1eacb74e3d",
        "/lib/base.php": "55548cc16b457cd74241990cc9d3b72b6335f2e5f45eee95171da024087d114fcbc2effc3d5818a6d5d55f2ae960ab39fd0414d0c542b72a3b9e08eb21206dd9"
    },
    "certificate": "-----BEGIN CERTIFICATE-----MIIBvTCCASagAwIBAgIUPvawyqJwCwYazcv7iz16TWxfeUMwDQYJKoZIhvcNAQEF\nBQAwIzEhMB8GA1UECgwYb3duQ2xvdWQgQ29kZSBTaWduaW5nIENBMB4XDTE1MTAx\nNDEzMTcxMFoXDTE2MTAxNDEzMTcxMFowEzERMA8GA1UEAwwIY29udGFjdHMwgZ8w\nDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANoQesGdCW0L2L+a2xITYipixkScrIpB\nkX5Snu3fs45MscDb61xByjBSlFgR4QI6McoCipPw4SUr28EaExVvgPSvqUjYLGps\nfiv0Cvgquzbx/X3mUcdk9LcFo1uWGtrTfkuXSKX41PnJGTr6RQWGIBd1V52q1qbC\nJKkfzyeMeuQfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvF/KIhRMQ3tYTmgHWsiM\nwDMgIDb7iaHF0fS+/Nvo4PzoTO/trev6tMyjLbJ7hgdCpz/1sNzE11Cibf6V6dsz\njCE9invP368Xv0bTRObRqeSNsGogGl5ceAvR0c9BG+NRIKHcly3At3gLkS2791bC\niG+UxI/MNcWV0uJg9S63LF8=\n-----END CERTIFICATE-----",
    "signature": "U29tZVNpZ25lZERhdGFFeGFtcGxl"
}
```
`hashes` is an array of all files in the folder with their corresponding SHA512 hashes (this is actually quite cheap to calculate), the `certificate` is the  certificate used for signing. It has to be issued by the ownCloud Root Authority and it's CN needs to be permitted to perform the required action. The `signature` is then a signature of the `hashes` which can be verified using the `certificate`.

Steps to do in other PRs, this is already a quite huge one:
- Add nag screen in case the code check fails to ensure that administrators are aware of this.
- Add code verification also to OCC upgrade and unify display code more.
- Add enforced code verification to apps shipped from the appstore with a level of "official"
- Add enfocrced code verification to apps shipped from the appstore that were already signed in a previous release
- Add some developer documentation on how devs can request their own certificate
- Check when installing ownCloud
- Add support for CRLs to allow revoking certificates

**Note:** The upgrade checks are only run when the instance has a defined release channel of `stable` (defined in `version.php`). If you want to test this, you need to change the channel thus and then generate the core signature:

```
➜  master git:(add-integrity-checker) ✗ ./occ integrity:sign-core --privateKey=resources/codesigning/core.key --certificate=resources/codesigning/core.crt
Successfully signed "core"
```

Then increase the version and you should see something like the following:

![2015-11-04_12-02-57](https://cloud.githubusercontent.com/assets/878997/10936336/6adb1d14-82ec-11e5-8f06-9a74801c9abf.png)

As you can see a failed code check will not prevent the further update. It will instead just be a notice to the admin. In a next step we will add some nag screen.

For packaging stable releases this requires the following additional steps as a last action before zipping:
1. Run `./occ integrity:sign-core` once
2. Run `./occ integrity:sign-app` _for each_ app. However, this can be simply automated using a simple foreach on the apps folder.
2015-12-01 11:55:20 +01:00
Morris Jobke f46d531a4f Replace some OC_Config calls with ILogger methods 2015-10-30 09:51:16 +01:00
Lukas Reschke a6f180f24e Remove invalid type-cast
This is an `is_array` operation and not a `in_array` one. Thus this typecast is not required.

Fixes https://github.com/owncloud/core/issues/20095
2015-10-29 15:19:02 +01:00
Morris Jobke 3b249f1967 Revert "setting to skip migration tests by default"
This reverts commit 7cbdd9b90b.
2015-10-27 21:25:11 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Roeland Jago Douma 9071e756a1 Fix for broken ajax/share.php endpoint
Even more code mess :(
All tests pass again. But I'm really not happy with this endpoint.
2015-10-23 09:24:03 +02:00
Thomas Müller f7f2a160dd Merge pull request #19918 from owncloud/send-begin-message
Update: state which step we are going to start and warn if it might b…
2015-10-21 14:52:19 +02:00
Joas Schilling e66e67567f Update - Only add one section for disabled apps 2015-10-21 10:39:56 +02:00
Joas Schilling 9200bbeaba Update: state which step we are going to start and warn if it might be slow 2015-10-21 09:17:38 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Thomas Müller d0f6bfe7b6 Merge pull request #19508 from owncloud/setting-to-skip-migration-tests
setting to skip migration tests by default
2015-10-02 12:15:23 +02:00
Morris Jobke 7cbdd9b90b setting to skip migration tests by default
* if you install owncloud via package it is not
  possible to skip migration tests
* this also allows to disable migration tests for
  an instance by default
2015-10-01 14:23:25 +02:00
Robin Appelman f4d180ee5c allow passing the fileinfo to the preview manager 2015-10-01 13:14:47 +02:00