-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
JWT tween is too restrictive and block some read actions #718
Comments
Actually it is not related to the rate limiting: the behaviour can be observed in prod as well whereas rate limiting is not deployed yet:
This is related to the This function always returns a 403 error when the user is found as blocked: v6_api/c2corg_api/security/roles.py Lines 46 to 47 in 1fa4744
Perhaps we could restrict the blocking to write actions? |
Seems fine to me. |
This could be done by checking the method (POST, PUT, DELETE) of the request, as already done in the rate limiting tween: https://github.com/c2corg/v6_api/blob/master/c2corg_api/tweens/rate_limiting.py#L23 |
ok for me too |
It is a bit complicated to block only write actions:
I think logging out a blocked user could be fine and much simpler? But then we would need https://github.com/c2corg/c2c_ui/blob/a4d340a09bd89fe1dedfe72b00311ace79737622/src/js/apis/c2c/index.js#L28 |
including the personal feed in the homepage or the user profile pages.
Seen in the logs:
The text was updated successfully, but these errors were encountered: