summaryrefslogtreecommitdiffstats
path: root/lib/public/appframework
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * ignore cursorclosingBernhard Posselt2015-01-291-21/+28
| |
* | Rename to allowEvalLukas Reschke2015-02-161-1/+1
| |
* | Allow AppFramework applications to specify a custom CSP headerLukas Reschke2015-02-162-1/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows AppFramework applications to specify a custom CSP header for example when the default policy is too strict. Furthermore this allows us to partially migrate away from CSS and allowed eval() in our JavaScript components. Legacy ownCloud components will still use the previous policy. Application developers can use this as following in their controllers: ```php $response = new TemplateResponse('activity', 'list', []); $cspHelper = new ContentSecurityPolicyHelper(); $cspHelper->addAllowedScriptDomain('www.owncloud.org'); $response->addHeader('Content-Security-Policy', $cspHelper->getPolicy()); return $response; ``` Fixes https://github.com/owncloud/core/issues/11857 which is a pre-requisite for https://github.com/owncloud/core/issues/13458 and https://github.com/owncloud/core/issues/11925
* | fix license emailBernhard Posselt2015-02-052-6/+6
| |
* | add a controller and reponse for ocsBernhard Posselt2015-02-052-0/+202
|/
* Merge pull request #12988 from owncloud/logfile_downloadMorris Jobke2015-01-091-0/+42
|\ | | | | Logfile download
| * add Download logfile button to admin settingsGeorg Ehrke2015-01-071-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add logSettingsController add download logfile button move getEntries to LogSettingsController move set log level to logsettingscontroller.php add warning if logfile is bigger than 100MB add unit test for set log level fix typecasting, add new line at EoF show log and logfile download only if log_type is set to owncloud add unit test for getFilenameForDownload
* | Intelligent containerBernhard Posselt2014-12-232-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * resolves dependencies by type hint or variable name * simpler route.php * implementation of https://github.com/owncloud/core/issues/12829 Generates and injects parameters automatically. You can now build full classes like $c->query('MyClassName') without having to register it as a service. The resolved object's instance will be saved by using registerService. If a constructor parameter is not type hinted, the parameter name will be taken. Therefore the following two implementations are identical: class Class1 { function __construct(MyClassName $class) class Class1 { function __construct($MyClassName) This makes it possible to also inject primitive values such as strings, arrays etc. In addition if the query could not be resolved, a `QueryException` is now thrown Routes can now be returned as an array from `routes.php` and an `appinfo/application.php` is optional Old commit messages: make it possible to return the routes instead of having to intialize the application try to get the controller by convention add first implementation of automatic resolve add another test just to be sure store the resolved object more tests add phpdoc to public app.php method use the same variable for the public app.php method deprecate old methods and add services for public interfaces deprecated getServer method disallow private api injection for apps other than core or settings (settings should be an app goddamnit :D) register userid because its such an often used variable fix indention and leading slash use test namespace add deprecation reasons, remove private api usage checks and remove deprecation from getServer() add additional public interfaces add public interface for rootfolder fix syntax error remove deprecation from methods where no alternative is there yet remove deprecated from method which has no alternative add timezone public service for #12881 add another deprecation hint move deprecation into separate branch remove dead comment first try to get the namespace from the info.xml, if it does not exist, just uppercase the first letter also trim the namespace name add an interface for timefactory move timefactory to public and add icontrollermethodreflector keep core interface fix copyright date in headers
* | Merge pull request #12982 from owncloud/timefac-ifaceThomas Müller2014-12-211-0/+38
|\ \ | |/ |/| Add an interface for the timefactory class
| * add an interface for the timefactory classBernhard Posselt2014-12-201-0/+38
| | | | | | | | fix indention
* | add isAdmin and isInGroup methods for the group managerBernhard Posselt2014-12-171-0/+1
| |
* | add a isLoggedIn method to the usersession and deprecate the isLoggedIn ↵Bernhard Posselt2014-12-171-1/+2
|/ | | | method on the api
* first round of deprecationBernhard Posselt2014-12-162-0/+13
|