aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Http
Commit message (Collapse)AuthorAgeFilesLines
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-252-20/+20
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: Support Safari mobileFerdinand Thiessen2024-08-211-0/+1
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(AppFramework): Allow requests with OCS-APIRequest header to pass CSRF checksprovokateurin2024-07-251-0/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-244-108/+12
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Fix newly spotted psalm issues, add exhaustive typed magic properties ↵Côme Chilliet2024-04-301-6/+6
| | | | | | for LDAP classes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Adjust user agent pattern for EdgeJulius Härtl2024-03-081-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix(CS): Fix coding styleJoas Schilling2024-02-141-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(request): Fix regex handling and coding-styleJoas Schilling2024-02-131-5/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(request): Handle reverse proxy setting a port in Forwarded-ForMikael Peigney2024-02-131-4/+10
| | | | Signed-off-by: Mikael Peigney <Mika56@users.noreply.github.com>
* chore: Add missing ArrayAccess template parametersCôme Chilliet2024-02-061-0/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #42794 from nextcloud/fix/invalid-trusted-proxiesFerdinand Thiessen2024-01-291-1/+8
|\ | | | | fix(Request): Catch exceptions in `isTrustedProxy`
| * fix(Request): Catch exceptions in `isTrustedProxy`Ferdinand Thiessen2024-01-271-1/+8
| | | | | | | | | | | | | | | | | | The function fails if the configured trusted proxies contain invalid characters and the underlying IpUtils will throw. But as it is used by `getRemoteAddress` which is used by logging / templating, thrown errors are not reported but silently fail with error 500. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | code style: ommited space, reverted [code review]Pavel Kryl2024-01-271-1/+1
| |
* | fixing bug #6914: Config Param 'overwritecondaddr' not workingPavel Kryl2024-01-271-6/+4
|/ | | | | | | - just ignoring/removing extra parameter 'protocol' as suggested by blizzz Signed-off-by: Pavel Kryl <pavel@kryl.eu>
* fix(API): Use a distinct exception so apps can react to it and customize the ↵Joas Schilling2023-11-281-5/+5
| | | | | | return Signed-off-by: Joas Schilling <coding@schilljs.com>
* enh(dispatcher): enforce psalm ranges in the http dispatcherArthur Schiwon2023-11-241-1/+21
| | | | | | - allows devs to provide int ranges for API arguments Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-233-13/+13
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* 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>