Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Joas Schilling
2fa78f6245
Reverse X-Forwarded-For list to read the correct proxy remote address
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-11-16 07:45:19 +07:00
Hamid Dehnavi
ea06cf2f39
Convert isset ternary to null coalescing operator
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Julius Härtl
dc3916e27c
fix: Only get params from PUT content if possible
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-02-03 22:30:04 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Joas Schilling
0af4e9d4fe
Merge pull request #34172 from audriga/add-scim-json-support
...
Add support for application/scim+json
2022-12-20 08:58:33 +07:00
Côme Chilliet
cf508c1e47
Use strict typing in base.php
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 09:10:40 +07:00
Stanimir Bozhilov
7dcd6eb561
Merge branch 'master' into add-scim-json-support
...
Signed-off-by: Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>
2022-12-19 09:07:38 +07:00
Artur Neumann
81f2857f34
check if params given to API are really an array
...
Signed-off-by: Artur Neumann <artur@jankaritech.com>
2022-12-15 13:45:22 +07:00
Stanimir Bozhilov
b44befa881
Move JSON content type regex to IRequest and make it a const
2022-12-08 15:11:23 +07:00
Stanimir Bozhilov
46c10c77e1
Fix the JSON content type regex to match all MIME types
...
Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
2022-09-26 11:51:44 +07:00
Stanimir Bozhilov
d80f8f6c82
Type hint JSON content type regex and use preg_match less
...
Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
2022-09-22 11:25:39 +07:00
Stanimir Bozhilov
f286a9d6ac
Use regex for all JSON-related content types
...
Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
2022-09-21 16:36:01 +07:00
Stanimir Bozhilov
0ace70488a
Treat application/json and application/scim+json in same if-block
...
Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
2022-09-21 15:31:50 +07:00
Stanimir Bozhilov
f0dbe1148a
Add support for application/scim+json content type
...
Signed-off-by: Stanimir Bozhilov <stanimir@audriga.com>
2022-09-20 16:18:52 +07:00
Simon Leiner
09362eaeaa
Support specifying IPv6 proxies in CIDR notation
...
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>
2022-08-02 17:36:47 +07:00
luz paz
368f83095d
Fix typos in lib/private subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/private`
Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Côme Chilliet
de5b7f260f
Trying without the use
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 11:10:00 +07:00
Côme Chilliet
9132ed8ef1
Use sabre function directly rather than duplicating it
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 11:10:00 +07:00
Joas Schilling
07a9f34385
Extract request id handling to dedicated class so it can be injected manually
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +07:00
Carl Schwan
6312c0df69
Check style update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
...
First round of modifications for PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +07:00
J0WI
3b656446af
Introduce ISecureRandom::CHAR_ALPHANUMERIC
...
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-07-08 15:11:31 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Lukas Reschke
a521ed874c
Remove unused constants
...
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>
2021-05-25 19:01:48 +07:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
...
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>
2021-02-18 13:31:24 +07:00
Christoph Wurst
9ce3ea3368
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +07:00
Roeland Jago Douma
adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
...
Unify links to php.net
2020-12-22 09:53:31 +07:00
Julius Härtl
fbbb48fcc2
Merge pull request #24730 from J0WI/fix-trusted-ipv6
...
Fix IPv6 localhost regex
2020-12-21 09:59:31 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
J0WI
331f30f085
Fix IPv6 localhost regex
...
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-12-16 14:37:56 +07:00
Daniel Kesselberg
8ebd31d686
Make $vars and $secureRandom required.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-10 17:06:32 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
J0WI
68ce17e59b
Unify links to php.net
...
Update all links to https://www.php.net/
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +07:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Georg Ehrke
3bdfb380fc
Fix PHPDoc of IRequest::getHeader
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-14 14:20:43 +07:00
Joas Schilling
74a9cadc50
Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validating
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-02 11:13:13 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst
734c62bee0
Format code according to PSR2
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:56:50 +07:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
3a415e4139
Remove space between switch case and colon
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:17:53 +07:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +07:00
Daniel Kesselberg
8331d8296b
Make getServerHost more robust to faulty user input
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-01-16 11:26:29 +07:00
Daniel Kesselberg
d393b1612b
Modify regex to match some other chromium browsers
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-27 17:24:52 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Julius Härtl
a055d8ddf9
Always return overwritehost if configured
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-28 15:02:33 +07:00