-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add checks for max response size in API Call #8957
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
feat: add checks for max response size in API Call #8957
Conversation
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a few comments!
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8957 +/- ##
==========================================
- Coverage 33.61% 33.60% -0.01%
==========================================
Files 315 315
Lines 24938 24951 +13
==========================================
+ Hits 8383 8386 +3
- Misses 15760 15768 +8
- Partials 795 797 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
/cherry-pick release-1.11 |
* feat: add checks for max response size in API Call GET request Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: tests Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: added changes suggested by jim Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * cleanup Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
* feat: add checks for max response size in API Call GET request * fix: tests * fix: added changes suggested by jim * cleanup --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> Co-authored-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
/cherry-pick release-1.10 |
* feat: add checks for max response size in API Call GET request Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: tests Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: added changes suggested by jim Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * cleanup Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
* feat: add checks for max response size in API Call GET request Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: tests Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: added changes suggested by jim Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * cleanup Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
* feat: add checks for max response size in API Call GET request Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: tests Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: added changes suggested by jim Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * cleanup Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Explanation
API Calls fetch data from external URL and saves it to the memory. If a user requests for a very large data from an API Call, this can cause the controller's memory to exhaust resulting in crash.
This PR adds checks for content-length of API Call response
Related issue
Milestone of this PR
/milestone 1.11.1
What type of PR is this
/kind bug
Proposed Changes
Proof Manifests
Checklist
Further Comments