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

Use better type safety when creating URLs #36

Merged
merged 4 commits into from
May 16, 2024
Merged

Use better type safety when creating URLs #36

merged 4 commits into from
May 16, 2024

Conversation

acoburn
Copy link
Contributor

@acoburn acoburn commented May 15, 2024

Improve type safety of URLs generated for a client ID document

Description of changes

At present, the URLs used in a rendered client ID document use string concatenation based on a client-supplied header, which could open the door to malicious behavior, especially if the redirect URLs are manipulated.

User testing instructions

Commit checklist

  • All acceptance criteria are met.
  • Includes tests to ensure functionality, accessibility and prevent regressions, including E2E tests for supported browsers.
  • Relevant documentation, if any, has been written/updated.
  • The changelog has been updated, if applicable.
  • A changeset version has been created, if applicable.
  • Meets Inrupt coding standards and adheres to commit conventions.

Design requirements checklist

  • Meets Inrupt API Design and UX standards
  • Is responsive to our documented minimum supported screen size + resolution
  • Code is extensible by external contributors or anyone forking

@acoburn acoburn requested a review from a team as a code owner May 15, 2024 19:18
Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
authorization-management-component ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 0:52am

Copy link
Contributor

@NSeydoux NSeydoux left a comment

Choose a reason for hiding this comment

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

Looks good. The preview fails on login, but that is because of Vercel. More things happen in the preview than I realized: if you curl https://authorization-management-component-jzsxmwmmk-inrupt.vercel.app/api/app, you get a result very different from what I anticipated.

src/helpers/clientId/clientId.ts Outdated Show resolved Hide resolved
@acoburn acoburn merged commit 40ed37d into main May 16, 2024
9 checks passed
@acoburn acoburn deleted the url-type-safety branch May 16, 2024 01:00
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