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

properly handling post request and sanitize request values before logging #705

Merged
merged 10 commits into from
Aug 16, 2024

Conversation

burnout87
Copy link
Collaborator

it turns out, the gallery-related endpoints are all only POST endpoint for the presence of files, so, adaptation is minimal

alongside with oda-hub/oda_api#273

@burnout87 burnout87 added product-gallery Related to the product gallery development test-oda-api labels Aug 15, 2024
cdci_data_analysis/flask_app/app.py Fixed Show fixed Hide fixed
cdci_data_analysis/flask_app/app.py Fixed Show fixed Hide fixed
cdci_data_analysis/flask_app/app.py Fixed Show fixed Hide fixed
cdci_data_analysis/flask_app/app.py Fixed Show resolved Hide resolved
cdci_data_analysis/flask_app/app.py Fixed Show fixed Hide fixed
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 17.72152% with 65 lines in your changes missing coverage. Please review.

Project coverage is 62.33%. Comparing base (6483081) to head (c0dab87).
Report is 11 commits behind head on master.

Files Patch % Lines
cdci_data_analysis/flask_app/app.py 17.72% 65 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #705      +/-   ##
==========================================
- Coverage   62.36%   62.33%   -0.03%     
==========================================
  Files          50       50              
  Lines        8957     8982      +25     
==========================================
+ Hits         5586     5599      +13     
- Misses       3371     3383      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@volodymyrss volodymyrss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, this should be straightforward, except for this log sanitization advice form QL.

@burnout87
Copy link
Collaborator Author

Sounds good, this should be straightforward, except for this log sanitization advice form QL.

defined a function that sanitizes the values of the request before logging, applied also to the run_analysis and call_back endpoints

what do you think?

@burnout87 burnout87 changed the title properly handling post request properly handling post request and sanitize request values before logging Aug 16, 2024
@burnout87 burnout87 merged commit 6e98f24 into master Aug 16, 2024
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product-gallery Related to the product gallery development test-oda-api test-plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants