aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
Commit message (Collapse)AuthorAgeFilesLines
* POC for PSR-4 autoloader server.php => Server.phpRoeland Jago Douma2016-03-091-1274/+0
|
* Update author informationLukas Reschke2016-03-011-1/+0
| | | | Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
* Make scrutinizer happyRoeland Jago Douma2016-02-181-2/+1
|
* getRootFolder should not setup the FS for any userRoeland Jago Douma2016-02-181-7/+2
| | | | | | | | | | | | | Fixes #22467 This can go wrong when an app (take the ldap app) DIs something that needs the rootFolder. This break if we use cookie auth since then we know the user at that point and thus try to setup the fs for that user. However if there are then incomming shares from an ldap user they will fails since the user manager can't find them yet. Now getRootFolder does not setup the fs for any user.
* Handles null as return code and uses proper UserFolder in trashbinMorris Jobke2016-02-161-1/+1
|
* revolutionar: change updates might even sent the new value (optional)Arthur Schiwon2016-02-091-2/+2
|
* Consolidate getQuota and setQuota methods in User instanceArthur Schiwon2016-02-091-2/+2
|
* Send events when enabling and disabling of appsArthur Schiwon2016-02-091-1/+2
|
* Make the share object lazyRoeland Jago Douma2016-02-041-1/+2
| | | | | Share providers can now just pass in a fileId. And the node will only be created once needed.
* [Share 2.0] Fix shareManagerRoeland Jago Douma2016-02-031-1/+2
|
* Add public API to give developers the possibility to adjust the global CSP ↵Lukas Reschke2016-01-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defaults Allows to inject something into the default content policy. This is for example useful when you're injecting Javascript code into a view belonging to another controller and cannot modify its Content-Security-Policy itself. Note that the adjustment is only applied to applications that use AppFramework controllers. To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. To test this add something like the following into an `app.php` of any enabled app: ``` $manager = \OC::$server->getContentSecurityPolicyManager(); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFrameDomain('asdf'); $policy->addAllowedScriptDomain('yolo.com'); $policy->allowInlineScript(false); $manager->addDefaultPolicy($policy); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFontDomain('yolo.com'); $manager->addDefaultPolicy($policy); $policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false); $policy->addAllowedFrameDomain('banana.com'); $manager->addDefaultPolicy($policy); ``` If you now open the files app the policy should be: ``` Content-Security-Policy:default-src 'none';script-src yolo.com 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src yolo.com 'self';connect-src 'self';media-src 'self';frame-src asdf banana.com 'self' ```
* [Share 2.0] Add getShareManager to OCP\IServerContainerRoeland Jago Douma2016-01-271-2/+1
|
* Check whether ownCloud is installedLukas Reschke2016-01-271-1/+2
| | | | | | ownCloud might not yet be setup. This causes an issue as the user config requires a setup ownCloud. Thus this needs a block whether ownCloud is installed or not. Fixes https://github.com/owncloud/core/issues/21955
* Move findLanguage() and setLanguageFromRequest() to factoryJoas Schilling2016-01-261-2/+5
|
* Merge pull request #21894 from owncloud/refactor-csrfThomas Müller2016-01-261-7/+20
|\ | | | | Add new CSRF manager for unit testing purposes
| * Add new CSRF manager for unit testing purposesLukas Reschke2016-01-251-7/+20
| | | | | | | | This adds a new CSRF manager for unit testing purposes, it's interface is based upon https://github.com/symfony/security-csrf. Due to some of our required custom changes it is however not possible to use the Symfony component directly.
* | remove unused variableMorris Jobke2016-01-251-1/+0
|/
* Merge pull request #21719 from owncloud/move-notification-api-to-ocpThomas Müller2016-01-221-1/+1
|\ | | | | Move the notification API to public namespace
| * Move the notification API to public namespaceJoas Schilling2016-01-221-1/+1
| |
* | Merge pull request #18531 from owncloud/ext-user-credentialsThomas Müller2016-01-221-0/+13
|\ \ | | | | | | External storage 'Login credentials' auth mechanism
| * | Introduce CredentialsManager for storage of credentials in DBRobin McCorkell2016-01-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CredentialsManager performs a simple role, of storing and retrieving encrypted credentials from the database. Credentials are stored by user ID (which may be null) and credentials identifier. Credentials themselves may be of any type that can be JSON encoded. The rationale behind this is to avoid further (mis)use of oc_preferences, which was being used for all manner of data not related to user preferences.
* | | Merge pull request #20768 from owncloud/mount-cacheThomas Müller2016-01-221-18/+34
|\ \ \ | |_|/ |/| | cache mountpoints in the db
| * | clear mount cache when deleting userRobin Appelman2016-01-201-17/+31
| | |
| * | log duplicatesRobin Appelman2016-01-201-1/+1
| | |
| * | cache mountpoints in the dbRobin Appelman2016-01-201-2/+4
| | |
* | | Merge pull request #21792 from owncloud/systemtags-managerfactoryThomas Müller2016-01-211-3/+10
|\ \ \ | | | | | | | | Allow custom implementation of system tag managers
| * | | Allow custom implementation of system tag managersVincent Petry2016-01-201-3/+10
| |/ / | | | | | | | | | | | | | | | | | | Added config.php option to replace the default implementation of system tag manager and system tag object mapper. Also adjusted the comments manager factory to inject the server container
* / / Introduce IUser::setEMailAddress and add hook mechanismThomas Müller2016-01-201-0/+4
|/ /
* / Properly DI the servercontainerRoeland Jago Douma2016-01-201-1/+1
|/
* [Share 2.0] Add share provider factoryRoeland Jago Douma2016-01-131-1/+27
| | | | | | | * Add providers * Add share manager to server container * Use share manager from server container * Properly get the share manager
* Merge pull request #21653 from owncloud/update-license-headers-2016Thomas Müller2016-01-131-2/+2
|\ | | | | Update license headers 2016
| * Happy new year!Thomas Müller2016-01-121-2/+2
| |
* | Allow admins to add system wide root certificatesRobin Appelman2016-01-121-3/+3
|/
* Just query the securerandom from the containerRoeland Jago Douma2016-01-091-1/+1
|
* Remove OC_DB::getConnectionMorris Jobke2016-01-071-2/+2
|
* Merge pull request #21281 from owncloud/allow-di-for-background-jobsThomas Müller2015-12-181-1/+1
|\ | | | | Allow background jobs to be service names for DI
| * Register app containers in the OC containerJoas Schilling2015-12-181-1/+1
| |
* | Inject Config into SystemConfigRoeland Jago Douma2015-12-181-3/+4
|/
* different strategy in cleaning up after user was deletedArthur Schiwon2015-12-091-0/+3
| | | | | | | | we do not listen to deletion hooks anymore, because there is no guarantee that they will be heard - requires that something fetches the CommentsManager first. Instead, in the user deletion routine the clean up method will be called directly. Same way as it happens for files, group memberships, config values.
* add icommentsmanger and icomment implementationArthur Schiwon2015-12-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | register CommentsManager service, allow override, document in config.sample.php don't insert autoincrement ids in tests, because of dislikes from oracle and pgsql specify timezone in null date only accepts strings for ID parameter that can be converted to int replace forgotten hardcoded IDs in tests react on deleted users react on file deletion Postgresql compatibility lastInsertId needs *PREFIX* with the table name do not listen for file deletion, because it is not reliable (trashbin, external storages) add runtime cache for comments
* DI in avatar codeRoeland Jago Douma2015-12-011-2/+6
| | | | | | | * DI in avatar code * Use the node API * More unit tests * Unit tests no longer require DB
* Add code integrity checkLukas Reschke2015-12-011-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+29
|\ | | | | Implement systemtag managers and mapper
| * Added system tags data structure and PHP side managersVincent Petry2015-11-271-0/+29
| | | | | | | | Added SystemTagManager and SystemTagObjectMapper
* | Dont die when we're missing a routeRobin Appelman2015-11-271-2/+3
|/
* Update license headersLukas Reschke2015-10-261-1/+1
|
* Remove dependency on ICrypto + use XORLukas Reschke2015-10-211-2/+0
|
* deduplicate @xenopathicMorris Jobke2015-10-061-1/+0
|
* update licence headers via scriptMorris Jobke2015-10-051-0/+2
|
* pass view hooks trough to the node hooksRobin Appelman2015-09-281-1/+5
|