summaryrefslogtreecommitdiffstats
path: root/lib/public/appframework
Commit message (Collapse)AuthorAgeFilesLines
* Move \OCP\AppFramework to PSR-4Roeland Jago Douma2016-05-0630-3583/+0
|
* Fix inconsistent nameing of AppFrameworkRoeland Jago Douma2016-04-221-1/+1
|
* lib: Fix typos (found by codespell)Stefan Weil2016-04-074-5/+5
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Add better messages for sometimes obscure exceptionsBernhard Posselt2016-04-041-2/+27
| | | | | | * add better messages for sometimes obscure exceptions * fix formatting
* Remove Scrutinizer Auto FixerLukas Reschke2016-03-013-3/+0
|
* Update author informationLukas Reschke2016-03-014-2/+4
| | | | Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
* Use IQueryBuilder::PARAM_* instead of \PDO::PARAM_*Joas Schilling2016-02-291-1/+1
|
* Fix more thingsJoas Schilling2016-02-191-1/+1
|
* Scrutinizer Auto-FixesScrutinizer Auto-Fixer2016-02-191-0/+1
| | | | This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
* set correct http status codev1r0x2016-02-181-1/+1
| | | Was intended to respond with a 303 (See other) status code instead of 307 (Temporary Redirect).
* Add public API to give developers the possibility to adjust the global CSP ↵Lukas Reschke2016-01-283-323/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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' ```
* Happy new year!Thomas Müller2016-01-1229-29/+29
|
* Update license headersLukas Reschke2015-10-264-2/+4
|
* Fix uploading avatar and root certs in IE8Vincent Petry2015-10-091-1/+7
|
* Use `/` if installed in main folderLukas Reschke2015-10-061-2/+2
| | | | | | Otherwise an empty string is used indicating the cookie is only valid for those resources. This can lead to eunexpected behaviour. Fixes https://github.com/owncloud/core/issues/19196
* update licence headers via scriptMorris Jobke2015-10-055-0/+5
|
* Add blob: scheme to default CSP policyLukas Reschke2015-09-291-0/+1
| | | | Fixes https://github.com/owncloud/core/issues/19438
* Encode HTML tags in JSONLukas Reschke2015-09-031-1/+1
| | | | While not encoding the HTML tags in the JSON response is perfectly fine since we set the proper mimetype as well as disable content sniffing a lot of automated code scanner do report this as security bug. Encoding them leads to less discussions and a lot of saved time.
* Cleanup OCS codeLukas Reschke2015-08-141-2/+0
| | | | This removes unused code from `OC_OCS` which nobody understood what it really was for anyways.
* With V2 we should ensure that the status codes are kept in syncThomas Müller2015-08-131-1/+1
|
* Merge pull request #18096 from sualko/patch-1Morris Jobke2015-08-101-0/+1
|\ | | | | add data: to allowed image domains
| * add data: to allowed image domainssualko2015-08-051-0/+1
| |
* | Use DIRoeland Jago Douma2015-08-101-0/+7
| | | | | | | | | | | | | | | | * 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
* | Fix unit test within OCSControllerThomas Müller2015-08-031-2/+1
| |
* | Remove duplicate and unused codeThomas Müller2015-08-032-26/+10
|/
* Check if response could get generatedLukas Reschke2015-07-021-2/+9
| | | | | | | | `json_encode` fails hard on PHP >= 5.5 if a non UTF-8 value is specified by returning false. Older PHP versions just nullify the value which makes it at least somewhat usable. This leads to very confusing errors which are very hard to debug since developers are usually not aware of this. In this case I'd consider throwing a fatal exception – since it arguably is an error situation – is a fair solution since this makes developers and administrators aware of any occurence of the problem so that these bugs can get fixed. Fixes https://github.com/owncloud/core/issues/17265
* update license headers and authorsMorris Jobke2015-06-256-1/+5
|
* Fix missing @since tags in OCPMorris Jobke2015-06-194-0/+14
|
* Add `no-store` to AppFrameworkLukas Reschke2015-06-151-1/+1
|
* Add support for disallowing domains to the ContentSecurityPolicyLukas Reschke2015-05-201-2/+110
| | | | | | For enhanced security it is important that there is also a way to disallow domains, including the default ones. With this commit every method gets added a new "disallow" function.
* Add version to @deprecated tagsMorris Jobke2015-04-193-20/+18
|
* fix wrong variable names in PHPDocMorris Jobke2015-04-182-4/+4
|
* Merge pull request #15679 from owncloud/fix-private-member-accessThomas Müller2015-04-171-2/+2
|\ | | | | Fix private member access of parent class in ocsresponse
| * Fix private member access of parent class in ocsresponseMorris Jobke2015-04-161-2/+2
| | | | | | | | * noticed while checking PHPDoc
* | Add @since tags to all methods in public namespaceMorris Jobke2015-04-1628-13/+187
|/ | | | | | | * 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-2627-304/+383
|
* Properly catch whether a share is `null`Lukas Reschke2015-03-241-0/+43
| | | | | | | | | | | | | | | | | | | | | Despite it's PHPDoc the function might return `null` which was not properly catched and thus in some situations the share was resolved to the sharing users root directory. To test this perform the following steps: * Share file in owncloud 7 (7.0.4.2) * Delete the parent folder of the shared file * The share stays is in the DB and the share via the sharelink is inaccessible. (which is good) * Upgrade to owncloud 8 (8.0.2) (This step is crucial. The bug is not reproduceable without upgrading from 7 to 8. It seems like the old tokens are handled different than the newer ones) * Optional Step: Logout, Reset Browser Session, etc. * Access the share via the old share url: almost empty page, but there is a dowload button which adds a "/download" to the URL. * Upon clicking, a download.zip is downloaded which contains EVERYTHING from the owncloud directory (of the user who shared the file) * No exception is thrown and no error is logged. This will add a check whether the share is a valid one and also adds unit tests to prevent further regressions in the future. Needs to be backported to ownCloud 8. Adding a proper clean-up of the orphaned shares is out-of-scope and would probably require some kind of FK or so. Fixes https://github.com/owncloud/core/issues/15097
* If the execute method on the mapper receives an assoc array, it binds by ↵Bernhard Posselt2015-03-191-19/+36
| | | | value instead of index
* also use backwards compatible method for mapperBernhard Posselt2015-03-181-1/+6
|
* fix backwards compatibility for mapper execute methodBernhard Posselt2015-03-181-2/+11
|
* Avatar controller moved to AppFrameWorkRoeland Jago Douma2015-03-111-0/+77
| | | | | | | | * Original avatarcontroller migrated to the appframework * Added DataDisplayResponse that show data inline in the browser (used to retrun the image) * Removed some unneeded code * Added unit tests for the avatarcontroller
* Merge pull request #14534 from owncloud/add-child-srcThomas Müller2015-03-101-0/+17
|\ | | | | Add support for 'child-src' directive
| * Add support for 'child-src' directiveLukas Reschke2015-02-281-0/+17
| | | | | | | | | | | | This is required when working with stuff such as PDF.js in the files_pdfviewer application. Opt-in only. Master change only because the stable CSP policies has a failback that allows nearly anything :see_no_evil:
* | Fix PHPDocLukas Reschke2015-03-042-2/+2
|/ | | | That apparently went lost when changing the signature.
* AppFramework StreamResponseBernhard Posselt2015-02-273-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | First stab at the StreamResponse, see #12988 The idea is to use an interface ICallbackResponse (I'm not 100% happy with the name yet, suggestions?) that allow the response to output things in its own way, for instance stream the file using readfile Unittests are atm lacking, plan is to check if a mock of ICallbackResponse will be used by calling its callback (also unhappy with this name) method Usage is: $response = new StreamResponse('path/to/file'); rename io to output, add additional methods and handle error and not modified cases when using StreamResponse fix indention and uppercasing, also handle forbidden cases fix indention fix indention no forbidden, figuring out if a file is really readable is too complicated to get to work across OSes and streams remove useless import remove useless import fix intendation
* Revert "Updating license headers"Morris Jobke2015-02-2624-314/+378
| | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* use IDBConnection and close cursors after insert/update/deleteBernhard Posselt2015-02-251-6/+10
|
* migrate to IDBConnectionBernhard Posselt2015-02-251-6/+8
|
* Updating license headersJenkins for ownCloud2015-02-2324-378/+314
|
* Merge pull request #13777 from owncloud/close-cursorLukas Reschke2015-02-201-21/+28
|\ | | | | Close cursor for appframework and manipulation queries if applicable