summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
Commit message (Collapse)AuthorAgeFilesLines
* Add feature policy headerRoeland Jago Douma2019-08-102-0/+73
| | | | | | | This adds the events and the classes to modify the feature policy. It also adds a default restricted feature policy. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Have the OCSBaseResponse call the parent constructorRoeland Jago Douma2019-08-081-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Split up security middlewareRoeland Jago Douma2019-07-273-43/+87
| | | | | | | | | | With upcoming work for the feature policy header. Splitting this in smaller classes that just do 1 thing makes sense. I rather have a few small classes that are tiny and do 1 thing right (and we all understand what is going on) than have big ones. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not try to autoload built in typesRoeland Jago Douma2019-06-042-16/+7
| | | | | | | | This avoids calls to the autoloader (or chain of autoloaders) to see if for example 'principalPrefix' class can be found. While we already know it is a string. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #15714 from nextcloud/fix/204_304_rfcRoeland Jago Douma2019-05-241-1/+9
|\ | | | | Check the actual status code for 204 and 304
| * Check the actual status code for 204 and 304Roeland Jago Douma2019-05-241-1/+9
| | | | | | | | | | | | | | | | | | | | The header is the full http header like: HTTP/1.1 304 Not Modified So comparing this to an int always yields false This also makes the 304 RFC compliant as the resulting content length should otherwise be the length of the message and not 0. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Make it possible to show admin settings for sub adminsChristoph Wurst2019-05-232-1/+14
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make sure all middlewares are only registered onceJoas Schilling2019-05-061-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a message about disabled global routesJoas Schilling2019-03-111-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure urlParams are correctly injected in global routesJoas Schilling2019-03-111-1/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make names mandatoryJoas Schilling2019-03-011-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #13969 from ↵Morris Jobke2019-02-071-1/+11
|\ | | | | | | | | nextcloud/enh/additional_scripts_no_on_public_pages No need to emit additonalscript event on public pages
| * Add StandaloneTemplateResponseRoeland Jago Douma2019-02-061-1/+2
| | | | | | | | | | | | | | This can be used by pages that do not have the full Nextcloud UI. So notifications etc do not load there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
| * No need to emit additonalscript event on public pagesRoeland Jago Douma2019-02-051-0/+9
| | | | | | | | | | | | | | There already is a separate event for this. This will make it possible to only inject code with the logged in one on default rendered pages. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Do not do redirect handling when loggin outRoeland Jago Douma2019-02-063-0/+101
|/ | | | | | | | | | | | | Fixes #12568 Since the clearing of the execution context causes another reload. We should not do the redirect_uri handling as this results in redirecting back to the logout page on login. This adds a simple middleware that will just check if the ClearExecutionContext session variable is set. If that is the case it will just redirect back to the login page. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #13694 from b108/duplicate-functionality-in-request-classRoeland Jago Douma2019-02-011-5/+1
|\ | | | | Remove duplicate functionality
| * Remove duplicate functionalityb108@volgograd2019-01-201-5/+1
| | | | | | | | | | | | This functionality implemented in the next line: $requestUri = preg_replace('%/{2,}%', '/', $requestUri);
* | Emit to load additionalscriptsRoeland Jago Douma2019-01-312-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #13662 This will fire of an event after a Template Response has been returned. There is an event for the generic loading and one when logged in. So apps can chose to load only on loged in pages. This is a more generic approach than the files app event. As some things we might want to load on other pages as well besides the files app. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Make RouteConfig strictJoas Schilling2019-01-221-63/+49
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Allow resources via OCS as wellJoas Schilling2019-01-221-1/+55
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cleanup middleware registeringRoeland Jago Douma2019-01-031-102/+77
| | | | | | | | | Fixes #12224 Since we only use the middleware at 1 location it makes no sense to register them in each and every container. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only trust the X-FORWARDED-HOST header for trusted proxiesRoeland Jago Douma2018-12-171-2/+8
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #11786 from nextcloud/feature/password_confirmation_backendMorris Jobke2018-11-061-0/+8
|\ | | | | Expose password confirmation capabilities in the user backend
| * Update password confirmation middlewareRoeland Jago Douma2018-11-021-0/+8
| | | | | | | | | | | | | | If the userbackend doesn't allow validating the password for a given uid then there is no need to perform this check. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Properly query the methodreflectorRoeland Jago Douma2018-11-021-1/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix testsRoeland Jago Douma2018-11-023-14/+14
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | The identityproof manager should be in ServerRoeland Jago Douma2018-11-021-8/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | No need to register it also in the DI ContainerRoeland Jago Douma2018-11-021-4/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | The Encryption manager belongs in Server.phpRoeland Jago Douma2018-11-021-4/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | SearchResult should be difined in Server as it is a core componentRoeland Jago Douma2018-11-021-5/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | The UserSession is constructed in the serverRoeland Jago Douma2018-11-021-2/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | TimeFactory is already regsitsered in the Server ContainerRoeland Jago Douma2018-11-021-3/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Request is already regsitered in the Server containerRoeland Jago Douma2018-11-021-5/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Was already registered in ServerRoeland Jago Douma2018-11-021-3/+0
|/ | | | | | The DIContainaer will query server anyways if it can't find it Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #12036 from olivermg/masterMorris Jobke2018-10-301-1/+39
|\ | | | | Add capability of specifying "trusted_proxies" entries in CIDR notation (IPv4)
| * Adding handling of CIDR notation to trusted_proxies for IPv4Oliver Wegner2018-10-301-1/+39
| | | | | | | | Signed-off-by: Oliver Wegner <void1976@gmail.com>
* | Merge pull request #12085 from nextcloud/add-gss-to-excluded-backendsMorris Jobke2018-10-301-1/+3
|\ \ | | | | | | add global site selector as user back-end which doesn't support password confirmation
| * | add global site selector as user back-end which doesn't support password ↵Bjoern Schiessle2018-10-271-1/+3
| |/ | | | | | | | | | | confirmation Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* / Add REMOTE_ADDR to getHeaderDaniel Kesselberg2018-10-251-2/+6
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Allow to inject/mock `new \DateTime()` similar to time()Joas Schilling2018-10-091-1/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* only catch QueryException when trying to build classRobin Appelman2018-09-211-7/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add wrapper Logger in DIContainerRoeland Jago Douma2018-09-042-0/+94
| | | | | | | This makes sure that for example app for the context is always set. We can in the future extend this to include more info. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* ensure we always return an array from `Request::getParams`Robin Appelman2018-08-281-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Do not use file as template parameterRoeland Jago Douma2018-08-091-1/+1
| | | | | | | | Using file will overwrite the $file parameter in the template base. Leading to trying to include a file that is the exception message. Which will of course fail. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add PublicShareMiddlewareTestRoeland Jago Douma2018-06-201-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't allow public share pages if link sharing is disabledRoeland Jago Douma2018-06-201-1/+27
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move public preview endpoint overRoeland Jago Douma2018-06-201-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add the new PublicShareController and PublicShareMiddlewareRoeland Jago Douma2018-06-203-1/+99
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not send a body for "No content", "Not modified" and othersJoas Schilling2018-05-041-3/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to inject ISearchResultJoas Schilling2018-04-261-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>