Commit Graph

109 Commits

Author SHA1 Message Date
Lukas Reschke 809ff5ac95 Add public API to give developers the possibility to adjust the global CSP 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'
```
2016-01-28 18:36:46 +01:00
Roeland Jago Douma f2e70441e4 [Share 2.0] Add getShareManager to OCP\IServerContainer 2016-01-27 22:04:37 +01:00
Thomas Müller 7731b29136 Merge pull request #21719 from owncloud/move-notification-api-to-ocp
Move the notification API to public namespace
2016-01-22 16:20:26 +01:00
Joas Schilling 31c5848e51 Allow automatic injection of the Manager 2016-01-22 11:02:40 +01:00
Joas Schilling ee02165005 Move the notification API to public namespace 2016-01-22 10:32:42 +01:00
Robin McCorkell da4127d23b Introduce CredentialsManager for storage of credentials in DB
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.
2016-01-18 11:10:41 +01:00
Thomas Müller c5a200c419 Merge pull request #21653 from owncloud/update-license-headers-2016
Update license headers 2016
2016-01-13 08:29:42 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin Appelman c15cab7ed6 Allow admins to add system wide root certificates 2016-01-12 12:50:59 +01:00
Arthur Schiwon dec1f1d24a anounce CommentsManager getter in public server interface 2015-12-09 14:34:23 +01:00
Vincent Petry b666367a79 Added system tags data structure and PHP side managers
Added SystemTagManager and SystemTagObjectMapper
2015-11-27 17:54:29 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Morris Jobke 8366ce2767 deduplicate @xenopathic 2015-10-06 09:52:19 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Joas Schilling e91e36f8df Add the L10N Factory to the container interface 2015-09-25 09:05:12 +02:00
Joas Schilling 38001d824b Move interfaces to private until they are no longer experimental 2015-09-08 09:01:02 +02:00
Joas Schilling 4e347170ac Notification API 2015-09-08 09:00:57 +02:00
Robin McCorkell cdf01f0419 Split mimetype handling to new class 2015-09-04 17:28:20 +01:00
Thomas Müller 0b64268910 Adding EventDispatcher to IServerContainer 2015-08-14 15:40:15 +02:00
Roeland Jago Douma f0b617b508 Use DI
* Register OCP\Capability\IManager at DIContainer
* Add register capabilities to appframework
* Register capabilities in DI way
* Make unit test pass again
* Remove CapabiltiesManager from OCP
2015-08-10 10:45:16 +02:00
Roeland Jago Douma 7e6a2b71fd Added Capabilities Manager
* This should allow the capabilities to be intergrated into the
appframework
* Unit tests
* Throw exception if closure does not return ICapability instance
2015-08-10 10:45:08 +02:00
Roeland Jago Douma 6db6689740 Added mimetype detector
* Copied unit tests from old functions
2015-07-27 14:58:45 +02:00
Morris Jobke 3e97ca3b96 Add getUserFolder to IRootFolder
* untangle DI of user specific folders
* allows to autodetect the dependency
2015-07-03 11:11:58 +02:00
Robin Appelman faf642c31d expose the mount manager in the public api 2015-07-01 15:57:04 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Morris Jobke 6856316122 Fix return value for OCP PHPDoc 2015-06-17 15:47:45 +02:00
Morris Jobke 9e506abec3 Fix OCP PHPDoc
* was always a string instead of \OCP\IUser
2015-06-17 11:10:55 +02:00
Morris Jobke 0c9604e3b2 [OCP] update PHPdoc to contain correct @since tags 2015-06-05 17:30:45 +02:00
Robin Appelman cdf7f91259 expose locking provider in the server container 2015-06-01 13:22:55 +02:00
Joas Schilling 7c65448377 Fix return type of the getRootFolder() method 2015-04-28 09:36:29 +02:00
Thomas Müller fc4127dd62 add $encryptionModuleId to methods of Keys/IStorage 2015-04-22 11:53:05 +02:00
Morris Jobke c056c52010 Add version to @deprecated tags 2015-04-19 01:04:59 +02:00
Morris Jobke 11f29f6d95 add visibility of methods in server container and interface 2015-04-18 14:19:22 +02:00
Morris Jobke 7644950b48 Add @since tags to all methods in public namespace
* enhance the app development experience - you can look up the
  method introduction right inside the code without searching
  via git blame
* easier to write apps for multiple versions
2015-04-16 17:00:08 +02:00
Morris Jobke 9c76d068c3 Merge pull request #15196 from owncloud/limit-file-activities-to-favorites
Limit file activities to favorites
2015-04-09 00:18:31 +02:00
Thomas Müller a4483243ac fixing license headers - encryption code related 2015-04-07 17:02:49 +02:00
Bjoern Schiessle e4895bda01 add helper class accessible for encryption modules to ask for a list of users with access to a file, needed to apply the recovery key to all files 2015-04-07 13:30:29 +02:00
Thomas Müller 6ccd3ffa23 adding function getSecureRandom(); to IServerContainer 2015-04-07 13:30:29 +02:00
Bjoern Schiessle a85e2e0bfd make recovery settings work 2015-04-07 13:30:28 +02:00
Joas Schilling 730efe25a4 Make scrutinizer happy 2015-04-01 12:13:49 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Lukas Reschke 5f044ebf1b Add wrapper for Guzzle 2015-03-25 16:04:41 +01:00
Lukas Reschke 13486a5ada Migrate to SwiftMail
Replaces the OC_Mail and phpmailer with SwiftMail allowing us to mock it properly.

Fixes the unit test execution on master on local machines and https://github.com/owncloud/core/issues/12014

Conflicts:
	3rdparty
	lib/private/server.php
	lib/public/iservercontainer.php
	tests/lib/mail.php
	tests/settings/controller/mailsettingscontrollertest.php

Conflicts:
	3rdparty
	lib/private/mail.php
	lib/private/server.php
	lib/public/iservercontainer.php
	settings/ajax/lostpassword.php
	settings/application.php
2015-03-16 12:47:05 +01:00
Thomas Müller f72f9e0159 Merge pull request #14530 from owncloud/revert-14403
Revert "Updating license headers"
2015-02-27 00:39:29 -08:00
Morris Jobke 0c1e6fad6c Merge pull request #14300 from owncloud/commandbus
Add async command system to handle asynchronous operations
2015-02-26 15:10:13 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Bernhard Posselt 4e29a4d867 deprecate getters for deprecated class 2015-02-25 22:21:24 +01:00
Robin Appelman bf65b1f18b Rename getAsyncCommandBus to getCommandBus 2015-02-25 15:09:41 +01:00
Robin Appelman 74ae7b8929 Add async command system to handle asynchronous operations 2015-02-25 15:08:40 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00