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

fix: only close response body in oauth handler in case of no error #2593

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

atzoum
Copy link
Contributor

@atzoum atzoum commented Oct 19, 2022

Description

According to the doc, if a request fails with error the response must be ignored as it can be nil

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Sorry, something went wrong.

@atzoum atzoum marked this pull request as ready for review October 19, 2022 11:37
@atzoum atzoum requested a review from sanpj2292 October 19, 2022 11:38
@atzoum atzoum force-pushed the fix.oauthNilResponse branch from 285035f to d53b2a0 Compare October 19, 2022 11:39
@atzoum atzoum requested review from chandumlg and cisse21 October 19, 2022 11:39
@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Base: 44.01% // Head: 44.01% // No change to project coverage 👍

Coverage data is based on head (d53b2a0) compared to base (a194b0c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2593   +/-   ##
=======================================
  Coverage   44.01%   44.01%           
=======================================
  Files         187      187           
  Lines       39086    39086           
=======================================
  Hits        17202    17202           
+ Misses      20805    20802    -3     
- Partials     1079     1082    +3     
Impacted Files Coverage Δ
utils/httputil/server.go 80.76% <0.00%> (-11.54%) ⬇️
services/rsources/handler.go 69.72% <0.00%> (-1.39%) ⬇️
enterprise/reporting/reporting.go 9.77% <0.00%> (+1.43%) ⬆️
enterprise/reporting/setup.go 52.38% <0.00%> (+14.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@atzoum atzoum requested a review from lvrach October 19, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants