Skip to content

Add bruteforce protection to the shareinfo endpoint - #26945

Merged
rullzer merged 1 commit into
masterfrom
enh/shareinfo/throttle
May 12, 2021
Merged

Add bruteforce protection to the shareinfo endpoint#26945
rullzer merged 1 commit into
masterfrom
enh/shareinfo/throttle

Conversation

@rullzer

Copy link
Copy Markdown
Member

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable21

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable20

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable19

@juliusknorr

Copy link
Copy Markdown
Member

Tests need adjustments:


There were 3 failures:
1) OCA\Files_Sharing\Tests\Controller\ShareInfoControllerTest::testNoShare
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
'ETag' => null
'contentSecurityPolicy' => null
'featurePolicy' => null
- 'throttled' => false
+ 'throttled' => true
'throttleMetadata' => Array (
+ 'token' => 'token'
)
)
/drone/src/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php:69
2) OCA\Files_Sharing\Tests\Controller\ShareInfoControllerTest::testWrongPassword
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
'ETag' => null
'contentSecurityPolicy' => null
'featurePolicy' => null
- 'throttled' => false
+ 'throttled' => true
'throttleMetadata' => Array (
+ 'token' => 'token'
)
)
/drone/src/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php:85
3) OCA\Files_Sharing\Tests\Controller\ShareInfoControllerTest::testNoReadPermissions
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
'ETag' => null
'contentSecurityPolicy' => null
'featurePolicy' => null
- 'throttled' => false
+ 'throttled' => true
'throttleMetadata' => Array (
+ 'token' => 'token'
)
)
/drone/src/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php:103

@rullzer
rullzerforce-pushed the enh/shareinfo/throttle branch from da8b5e3 to 7012945CompareMay 12, 2021 07:34
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@rullzer@juliusknorr@nickvergessen@LukasReschke