aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http
Commit message (Collapse)AuthorAgeFilesLines
* Reverse X-Forwarded-For list to read the correct proxy remote addressJoas Schilling2023-11-161-2/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Convert isset ternary to null coalescing operatorHamid Dehnavi2023-09-281-6/+2
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-152-11/+11
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-7/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Only get params from PUT content if possibleJulius Härtl2023-02-031-6/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* composer run cs:fixCôme Chilliet2023-01-202-5/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(app framework)!: Inject services into controller methodsChristoph Wurst2023-01-181-1/+8
| | | | | | | | | | | | | | | Usually Nextcloud DI goes through constructor injection. This has the implication that each instance of a class builds the full DI tree. That is the injected services, their services, etc. Occasionally there is a service that is only needed for one controller method. Then the DI tree is build regardless if used or not. If services are injected into the method, we only build the DI tree if that method gets executed. This is also how Laravel allows injection. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #34172 from audriga/add-scim-json-supportJoas Schilling2022-12-201-2/+3
|\ | | | | Add support for application/scim+json
| * Merge branch 'master' into add-scim-json-supportStanimir Bozhilov2022-12-192-3/+2
| |\ | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>
| * | Move JSON content type regex to IRequest and make it a constStanimir Bozhilov2022-12-081-4/+1
| | |
| * | Fix the JSON content type regex to match all MIME typesStanimir Bozhilov2022-09-261-1/+1
| | | | | | | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
| * | Type hint JSON content type regex and use preg_match lessStanimir Bozhilov2022-09-221-4/+4
| | | | | | | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
| * | Use regex for all JSON-related content typesStanimir Bozhilov2022-09-211-6/+7
| | | | | | | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
| * | Treat application/json and application/scim+json in same if-blockStanimir Bozhilov2022-09-211-11/+3
| | | | | | | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
| * | Add support for application/scim+json content typeStanimir Bozhilov2022-09-201-0/+11
| | | | | | | | | | | | Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
* | | Use strict typing in base.phpCôme Chilliet2022-12-191-17/+8
| |/ |/| | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #35780 from ↵Vincent Petry2022-12-161-1/+1
|\ \ | | | | | | | | | | | | nextcloud/fix/http-dispatcher-double-parameter-cast Fix missing cast of double controller parameters
| * | fix(app framework): Fix missing cast of double controller parametersChristoph Wurst2022-12-151-1/+1
| |/ | | | | | | | | | | ``settype`` allows 'double' as alias of 'float'. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* / check if params given to API are really an arrayArtur Neumann2022-12-151-2/+1
|/ | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* Support specifying IPv6 proxies in CIDR notationSimon Leiner2022-08-021-30/+3
| | | | | | | | | | Previously, it was not possible to use CIDR notation for IPv6 proxies in the trusted_proxies parameter of config.php [1]. This patch adds support for that. [1]: https://docs.nextcloud.com/server/24/admin_manual/configuration_server/reverse_proxy_configuration.html#defining-trusted-proxies Signed-off-by: Simon Leiner <simon@leiner.me>
* Fix typos in lib/private subdirectoryluz paz2022-07-272-3/+3
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Trying without the useCôme Chilliet2022-04-261-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use sabre function directly rather than duplicating itCôme Chilliet2022-04-261-11/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-idJoas Schilling2022-03-222-18/+59
|\ | | | | Extract request id handling to dedicated class so it can be injected without DB dependency
| * Extract request id handling to dedicated class so it can be injected manuallyJoas Schilling2022-02-232-18/+59
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Diagnostics event logging to Nextcloud logJulius Härtl2022-02-281-1/+10
|/ | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net> Add config samples Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Check style updateCarl Schwan2022-01-132-3/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-231-2/+3
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve syntax error reportingCarl Schwan2021-09-211-1/+1
| | | | | | | | | | | | | | | | | | In some cases the error information is not enough to debug it. Before: syntax error, unexpected '<<' (T_SL) /var/www/html/lib/private/AppFramework/Http/Dispatcher.php 158 After: syntax error, unexpected '<<' (T_SL) in file '/var/www/html/apps/groupfolders/lib/Mount/GroupFolderStorage.php' line 88 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php 158 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Introduce ISecureRandom::CHAR_ALPHANUMERICJ0WI2021-07-081-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-043-3/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Remove unused constantsLukas Reschke2021-05-251-13/+0
| | | | | | | | No calls in all of GitHub as per https://sourcegraph.com/search?q=USER_AGENT_OWNCLOUD_&patternType=literal Deprecation has also been years ago. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-2/+2
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-7/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22916 from J0WI/unifiy-links-to-php.netRoeland Jago Douma2020-12-221-1/+1
|\ | | | | Unify links to php.net
| * Unify links to php.netJ0WI2020-09-171-1/+1
| | | | | | | | | | | | Update all links to https://www.php.net/ Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Merge pull request #24730 from J0WI/fix-trusted-ipv6Julius Härtl2020-12-211-1/+1
|\ \ | | | | | | Fix IPv6 localhost regex
| * | Fix IPv6 localhost regexJ0WI2020-12-161-1/+1
| | | | | | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | | Update all license headers for Nextcloud 21Christoph Wurst2020-12-163-1/+3
|/ / | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Make $vars and $secureRandom required.Daniel Kesselberg2020-12-101-2/+2
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Remove the cookie paths for php<7.3Christoph Wurst2020-11-061-12/+8
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Format code to a single space around binary operatorsChristoph Wurst2020-10-051-2/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Fix testsJoas Schilling2020-10-021-2/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Log the number of queries built and executedJoas Schilling2020-09-251-1/+52
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix PHPDoc of IRequest::getHeaderGeorg Ehrke2020-07-141-1/+1
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validatingJoas Schilling2020-07-021-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to specify the cookie type for appframework responsesRoeland Jago Douma2020-06-221-2/+14
| | | | | | | | | In general it is good to set them to Lax. But also to give devs more control over them is not a bad thing. Helps with #21474 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>