summaryrefslogtreecommitdiffstats
path: root/lib/public/security
Commit message (Collapse)AuthorAgeFilesLines
* Move \OCP\Security to PSR-4Roeland Jago Douma2016-05-186-380/+0
|
* Update author informationLukas Reschke2016-03-011-2/+2
| | | | Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
* Add public API to give developers the possibility to adjust the global CSP ↵Lukas Reschke2016-01-281-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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' ```
* Introduce CredentialsManager for storage of credentials in DBRobin McCorkell2016-01-181-0/+71
| | | | | | | | | | | 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.
* Happy new year!Thomas Müller2016-01-124-4/+4
|
* Use PHP polyfillsLukas Reschke2015-12-112-6/+8
|
* Use native CSPRNG if availableLukas Reschke2015-11-091-3/+5
| | | | Unfortunately only PHP 7…
* Fix type annotationLukas Reschke2015-04-271-1/+1
| | | | Obviously should be an int
* Add @since tags to all methods in public namespaceMorris Jobke2015-04-164-0/+18
| | | | | | | * 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
* Update license headersJenkins for ownCloud2015-03-264-16/+72
|
* Revert "Updating license headers"Morris Jobke2015-02-264-68/+21
| | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* Updating license headersJenkins for ownCloud2015-02-234-21/+68
|
* URLEncode logout attributeLukas Reschke2015-02-131-2/+3
| | | | Otherwise logout can fail if the requesttoken contains a +
* Add OCP\Security\IHasherLukas Reschke2014-11-061-0/+48
| | | | | | | Public interface for hashing which also works with legacy ownCloud hashes and supports updating the legacy hash via a passed reference. Follow-up of https://github.com/owncloud/core/pull/10219#issuecomment-61624662 Requires https://github.com/owncloud/3rdparty/pull/136
* Fix quotingLukas Reschke2014-09-031-1/+1
|
* Add test for the second argumentLukas Reschke2014-09-031-1/+1
|
* Fix CHAR_SYMBOLSLukas Reschke2014-09-031-1/+1
|
* Add char consts, hash the specified password for the HMACLukas Reschke2014-09-031-0/+8
|
* Add some security utilitiesLukas Reschke2014-08-273-0/+124
This adds some security utilities to core including: - A library for basic crypto operations (e.g. to encrypt passwords) - A better library for cryptographic actions which allows you to specify the charset - A library for secure string comparisions Remove .htaccess Remove .htaccess Fix typo Add public API Use timing constant comparision Remove CBC constant Adjust code Remove confusing $this