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

chore: don't return allowed return URLs #4044

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

jonas-jonas
Copy link
Member

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (68693a4) to head (99f52a4).
Report is 9 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4044       +/-   ##
===========================================
+ Coverage        0   78.34%   +78.34%     
===========================================
  Files           0      370      +370     
  Lines           0    26118    +26118     
===========================================
+ Hits            0    20461    +20461     
- Misses          0     4096     +4096     
- Partials        0     1561     +1561     

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

WithDebugf("Allowed domains are: %v", strings.Join(lo.Map(o.allowlist, func(u url.URL, _ int) string {
return u.String()
}), ", ")))
WithReasonf("Requested return_to URL %q is not allowed.", returnTo),
Copy link
Member

Choose a reason for hiding this comment

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

Log this instead then? Or trace?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think that adds any value, because you can always check the project configuration.

I added this a while back mainly to make live for a developer implementing Ory a little easier, but in this configuration we're leaking this information to end users if they deliberately trigger this error (e.g. by providing an illegal return_to).

Copy link
Member

Choose a reason for hiding this comment

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

ok

@aeneasr aeneasr requested review from aeneasr and removed request for aeneasr August 26, 2024 09:50
@aeneasr aeneasr merged commit 54cb464 into master Aug 26, 2024
31 checks passed
@aeneasr aeneasr deleted the jonas-jonas/dontReturnAllowedReturnTo branch August 26, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants