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: handle redirect loop #66

Merged
merged 4 commits into from
Dec 7, 2023
Merged

fix: handle redirect loop #66

merged 4 commits into from
Dec 7, 2023

Conversation

stebenz
Copy link
Collaborator

@stebenz stebenz commented Nov 16, 2023

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

@stebenz stebenz requested a review from livio-a November 16, 2023 13:20
@stebenz stebenz self-assigned this Nov 16, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (45a75c4) 47.25% compared to head (0afe35b) 47.36%.

Files Patch % Lines
pkg/provider/logout_response.go 0.00% 7 Missing ⚠️
pkg/provider/response.go 50.00% 4 Missing and 2 partials ⚠️
pkg/provider/xml/xml.go 40.00% 3 Missing ⚠️
pkg/provider/logout.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   47.25%   47.36%   +0.11%     
==========================================
  Files          21       21              
  Lines        1983     1974       -9     
==========================================
- Hits          937      935       -2     
+ Misses        988      981       -7     
  Partials       58       58              

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

@livio-a
Copy link
Member

livio-a commented Nov 23, 2023

can you please give me some context about this PR

@stebenz
Copy link
Collaborator Author

stebenz commented Nov 23, 2023

@livio-a Sure, if you fail to login or logout in SAMl you're supposed to get a code 200 and a response with what went wrong.
The problem here is that the response should be delivered to the serviceprovider, but if no serviceprovider matches with the request or the request can't be read correctly(empty, decoding error, unmarshalling error) the URL where the response should be send to is empty. An empty response URL with post-binding results in a from post with empty URL, which ends in a redirect loop.

Was mentioned in a discord discussion I think, and as I had a look at it I could also just fix it.

@livio-a livio-a merged commit bcc610f into main Dec 7, 2023
5 of 6 checks passed
@livio-a livio-a deleted the redirect-loop branch December 7, 2023 19:16
Copy link

github-actions bot commented Dec 7, 2023

🎉 This PR is included in version 0.1.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants