| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|\
| |
| | |
Use ::class statement instead of string
|
| |
| |
| |
| | |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|/
|
|
|
|
| |
Fixes #5694
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|
|
|
|
|
|
|
| |
PHPDoc (of the public API) says that this method returns string but it also returns null, which is not allowed in some method calls. This fixes that behaviour and returns an empty string and fixes all code paths that explicitly checked for null to be still compliant.
Found while enabling the strict_typing for lib/private for the PHP7+ migration.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|\
| |
| | |
Make the ITimeFactory strict + return types
|
| |
| |
| |
| | |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|/
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
|
|
| |
Add tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
|
|
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|\
| |
| | |
Use proper DI for security middleware for app enabled check
|
| |
| |
| |
| | |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|/
|
|
| |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
|
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
|
|
| |
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
|
|
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
|
|
| |
This is public API and breaks the middlewares of existing apps. Since this also requires maintaining two different code paths for 12 and 13 I'm at the moment voting for reverting this change.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
|\
| |
| | |
Add metadata to \OCP\AppFramework\Http\Response::throttle
|
| |
| |
| |
| |
| |
| | |
Fixes https://github.com/nextcloud/server/issues/5891
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
|\ \
| | |
| | | |
Prop argument type for Middleware
|
| |/
| |
| |
| | |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|/
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
|
|
| |
Signed-off-by: Oliver Hanraths <olli@coderkun.de>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
|
|
| |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
|
|
|
|
|
| |
This reverts commit 31f9be7a75712e9f8b7831ed29397527f9fa8baf.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
|
|
|
|
| |
This makes the new `@BruteForceProtection` annotation more clever and moves the relevant code into it's own middleware.
Basically you can now set `@BruteForceProtection(action=$key)` as annotation and that will make the controller bruteforce protected. However, the difference to before is that you need to call `$responmse->throttle()` to increase the counter. Before the counter was increased every time which leads to all kind of unexpected problems.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
|\
| |
| | |
Reorder the entries of the log for easier reading
|
| |
| |
| |
| | |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
| |
| |
| |
| | |
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
This allows adding rate limiting via annotations to controllers, as one example:
```
@UserRateThrottle(limit=5, period=100)
@AnonRateThrottle(limit=1, period=100)
```
Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
|
|\
| |
| | |
Match slashes in ../{id} resource routes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #2954
Before we could match on <prefix>/{id} however if the id contains a /
this would not match properly. But since we define the resource routes
internally we now make sure that we match all chars (up until the ?).
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Fixes #3890
If we do a put request without a body the current code still tries to
read the body. This patch makes sure that we do not try to read the body
if the content length is 0.
See RFC 2616 Section 4.3
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
|
|
| |
Signed-off-by: Joas Schilling <coding@schilljs.com>
|