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 issuer validation in tokens_issuer.go #311

Closed
wants to merge 1 commit into from

Conversation

4cecoder
Copy link

@4cecoder 4cecoder commented Aug 8, 2024

Related to #309

Update the IsValid method in clerk/tokens_issuer.go to strictly check the issuer's domain segment.

  • Parse the issuer URL and extract the hostname.
  • Accept only issuers that match the exact domain clerk.com or subdomains of clerk.com.
  • Return false if the URL parsing fails.

For more details, open the Copilot Workspace session.

Related to #309

Update the `IsValid` method in `clerk/tokens_issuer.go` to strictly check the issuer's domain segment.

* Parse the issuer URL and extract the hostname.
* Accept only issuers that match the exact domain `clerk.com` or subdomains of `clerk.com`.
* Return false if the URL parsing fails.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/clerk/clerk-sdk-go/issues/309?shareId=XXXX-XXXX-XXXX-XXXX).
@4cecoder 4cecoder requested a review from a team as a code owner August 8, 2024 02:49
@gkats
Copy link
Member

gkats commented Sep 9, 2024

Hello @4cecoder, thanks for the contribution!

Unfortunately, the solution is not correct. Please see the following discussion for more information.

#309 (comment)

@4cecoder
Copy link
Author

4cecoder commented Sep 9, 2024

Close the pr

@gkats gkats closed this Sep 9, 2024
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.

2 participants