Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bruteforce protection to the shareinfo endpoint #26945

Merged
merged 1 commit into from May 12, 2021

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented May 11, 2021

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

@rullzer
Copy link
Member Author

rullzer commented May 11, 2021

/backport to stable21

@rullzer
Copy link
Member Author

rullzer commented May 11, 2021

/backport to stable20

@rullzer
Copy link
Member Author

rullzer commented May 11, 2021

/backport to stable19

@juliushaertl
Copy link
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

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants