summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix endless recursionThomas Müller2015-12-021-1/+1
|
* Fix getCloudIdThomas Müller2015-12-021-1/+7
|
* Adding unit test for User::getCloudId()Thomas Müller2015-12-021-0/+18
|
* Add the user's cloud id to the vCardThomas Müller2015-12-021-0/+3
|
* Add IUser::getAvatarImage() for easy accessThomas Müller2015-12-021-1/+3
|
* DI in avatar codeRoeland Jago Douma2015-12-013-94/+198
| | | | | | | * DI in avatar code * Use the node API * More unit tests * Unit tests no longer require DB
* Support pretty URLsLukas Reschke2015-12-011-0/+20
| | | | | | | | | | | | This changeset allows ownCloud to run with pretty URLs, they will be used if mod_rewrite and mod_env are available. This means basically that the `index.php` in the URL is not shown to the user anymore. Also the not deprecated functions to generate URLs have been modified to support this behaviour, old functions such as `filePath` will still behave as before for compatibility reasons. Examples: http://localhost/owncloud/index.php/s/AIDyKbxiRZWAAjP => http://localhost/owncloud/s/AIDyKbxiRZWAAjP http://localhost/owncloud/index.php/apps/files/ => http://localhost/owncloud/apps/files/ Due to the way our CSS and JS is structured the .htaccess uses some hacks for the final result but could be worse... And I was just annoyed by all that users crying for the removal of `index.php` ;-)
* Add code integrity checkLukas Reschke2015-12-0118-2/+1936
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 :wink:). 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.
* Merge pull request #20650 from owncloud/systemtags-coreThomas Müller2015-11-302-0/+740
|\ | | | | Implement systemtag managers and mapper
| * Fix phpstorm complains in testsJoas Schilling2015-11-302-9/+7
| |
| * Cleanup imports and type hintingThomas Müller2015-11-302-11/+18
| |
| * Add phpunit group for testsJoas Schilling2015-11-302-0/+12
| |
| * Added system tags data structure and PHP side managersVincent Petry2015-11-272-0/+723
| | | | | | | | Added SystemTagManager and SystemTagObjectMapper
* | Don't break app on travisThomas Müller2015-11-301-0/+5
| |
* | More group DBThomas Müller2015-11-301-0/+7
| |
* | Add DB group to some files_external testsThomas Müller2015-11-302-1/+8
| | | | | | | | | | | | | | | | | | | | Adding group Db to federation tests and ldap tests Add group DB to Test_UrlGenerator Adding group DB to trashbin and versions tests Adding group DB to Test_Util_CheckServer for pg
* | Adding more DB groups to test suitsThomas Müller2015-11-3022-3/+140
| | | | | | | | Adding more DB groups to test suits
* | Further unit test suite tweatsThomas Müller2015-11-303-50/+87
| |
* | Adding more test suites to group DBThomas Müller2015-11-301-2/+23
| |
* | Mock DIContainer to not hit the databaseThomas Müller2015-11-301-1/+3
| |
* | Apply DB group annotation ...Thomas Müller2015-11-3049-4/+271
| |
* | A TestCase which is not annotated to be in group DB will not allow access to ↵Thomas Müller2015-11-301-3/+32
| | | | | | | | | | | | the database connection. This is necessary to categorize unit test and avoid duplicate test case execution - it also allows us to closely review unit test implementations to identify unnecessary db calls.
* | Merge pull request #20788 from owncloud/catch-missing-routeThomas Müller2015-11-301-3/+3
|\ \ | | | | | | Dont die when we're missing a route
| * | fix testsRobin Appelman2015-11-271-3/+3
| | |
* | | Merge pull request #20789 from owncloud/scanner-skip-not-availableRobin Appelman2015-11-272-6/+6
|\ \ \ | | | | | | | | Skip unavailable storages in scanner
| * | | Skip unavailable storages in scannerRobin Appelman2015-11-272-6/+6
| |/ /
* / / Added tests.Mitar2015-11-271-0/+20
|/ /
* | Merge pull request #20602 from owncloud/fix-installed-appsThomas Müller2015-11-262-4/+13
|\ \ | | | | | | Always installed apps includes the hardcoded ones from shipped.json
| * | fix unit testsMorris Jobke2015-11-232-4/+13
| | |
* | | Merge pull request #20702 from owncloud/move-user-principal-into-subfolderThomas Müller2015-11-261-1/+6
|\ \ \ | | | | | | | | Users are available under it's own principal resource named 'principa…
| * | | Introduce \OCP\IUser::getEMailAddress()Thomas Müller2015-11-251-1/+6
| | | |
* | | | Merge pull request #20393 from owncloud/querybuilder-select-with-aliasThomas Müller2015-11-261-34/+116
|\ \ \ \ | | | | | | | | | | Add a method to select a field or value with alias
| * | | | Add a method to select a field or value with aliasJoas Schilling2015-11-231-34/+116
| | | | |
* | | | | Merge pull request #20744 from owncloud/oc_helper-getMimeType-cleanupThomas Müller2015-11-261-23/+0
|\ \ \ \ \ | | | | | | | | | | | | Remove last occurences of OC_Helper::getMimeType()
| * | | | | Remove last occurences of OC_Helper::getMimeType()Morris Jobke2015-11-261-23/+0
| | |/ / / | |/| | | | | | | | | | | | | * ref #4774
* | | | | Merge pull request #20731 from owncloud/per-storage-updaterThomas Müller2015-11-261-30/+11
|\ \ \ \ \ | | | | | | | | | | | | Make Cache\Updater per storage
| * | | | | Make Cache\Updater per storageRobin Appelman2015-11-251-30/+11
| | | | | |
* | | | | | Remove unused internal methodsMorris Jobke2015-11-261-12/+0
| |/ / / / |/| | | | | | | | | | | | | | | | | | | * removes OC_Helper::mb_substr_replace and OC_Helper::mb_str_replace * keeps public interface wrapper working as expected
* | | | | Merge pull request #20691 from owncloud/share2.0_di_fixesThomas Müller2015-11-252-255/+108
|\ \ \ \ \ | |/ / / / |/| | | | [Sharing 2.0] di fixes
| * | | | [Sharing 2.0] Default share provider only generic DIRoeland Jago Douma2015-11-241-141/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No injection of userfolders etc. Only generic DI components (IRootFolder) etc should be used to make sure we can also run this from the cli
| * | | | [Sharing 2.0] Removed unused DI stuffRoeland Jago Douma2015-11-241-114/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The share manager etc should not care about filtering stuff. They should return what is asked for them.
* | | | | Merge pull request #20439 from owncloud/etag-propagate-in-storageThomas Müller2015-11-253-38/+43
|\ \ \ \ \ | | | | | | | | | | | | Take submount etag into account for folder etags
| * | | | | update testsRobin Appelman2015-11-192-38/+10
| | | | | |
| * | | | | take the etag of child mounts into account for the folder etagRobin Appelman2015-11-191-0/+33
| | |_|/ / | |/| | | | | | | | | | | | | this replaces shared etag propagation
* | | | | Make sure that object id can be a stringJoas Schilling2015-11-231-14/+22
| |/ / / |/| | |
* | | | Merge pull request #20617 from owncloud/fix-usage-of-lastInsertIdThomas Müller2015-11-233-44/+7
|\ \ \ \ | | | | | | | | | | lastInsertId() is properly working with Oracle if the table name is p…
| * | | | lastInsertId() is properly working with Oracle if the table name is properly ↵Thomas Müller2015-11-233-44/+7
| | | | | | | | | | | | | | | | | | | | passed in
* | | | | Merge pull request #20543 from owncloud/share2.0_fix_hooksThomas Müller2015-11-232-211/+410
|\ \ \ \ \ | |_|_|/ / |/| | | | Move hook and delete children logic to share manager
| * | | | [Sharing 2.0] Move hook and delete children logic to share managerRoeland Jago Douma2015-11-232-211/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make sure hooks are always fired and child entries are always cleaned. This logic is moved to the share manager. * Updated unit tests
* | | | | Merge pull request #20577 from owncloud/notifications-datetime-timestampThomas Müller2015-11-231-25/+35
|\ \ \ \ \ | |/ / / / |/| | | | Use a DateTime object instead of a timestamp