Skip to content

Add bruteforce protection to the shareinfo endpoint#26945

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

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

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

@juliusknorr
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

@rullzer rullzer force-pushed the enh/shareinfo/throttle branch from da8b5e3 to 7012945 Compare May 12, 2021 07:34
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.

4 participants