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

use "app_api" session key in rate limit middleware, "app_api_system" is deprecated #46446

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

andrey18106
Copy link
Contributor

This PR updating RateLimit middleware.

The app_api_system session key is deprecated and will be removed in the future. Use app_api session key instead.

  • Resolves: #

Summary

TODO

  • ...

Checklist

@bigcat88 bigcat88 added 3. to review Waiting for reviews 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 12, 2024
@bigcat88 bigcat88 force-pushed the update-app-api-rate-limit-key branch from 83f48e9 to 960cfa5 Compare July 18, 2024 12:39
@bigcat88
Copy link
Member

I corrected the logic of this so that the RateLimit would be applied to ExApps if the userId is in the session, so that the development of ExApps would be compatible with the rate limit.

For ExApps, it is impossible to check on their side what the rate limit is, and in this case, if the request comes from a user, ExApp must set the userId and this will be checked by the server as usual.

If they need it outside the context of the user, they may not expose the user if the endpoint supports it and then the rate limit will be skipped.

@bigcat88 bigcat88 enabled auto-merge July 18, 2024 13:42
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
@andrey18106 andrey18106 force-pushed the update-app-api-rate-limit-key branch from 58826a8 to 40f8204 Compare July 18, 2024 14:17
@bigcat88 bigcat88 merged commit a5fdd1c into master Jul 18, 2024
166 checks passed
@bigcat88 bigcat88 deleted the update-app-api-rate-limit-key branch July 18, 2024 17:42
@blizzz blizzz mentioned this pull request Jul 24, 2024
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish feedback-requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants