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

[Bug fix] Decoding bug fix #61

Merged
merged 16 commits into from
Jun 11, 2024
Merged

[Bug fix] Decoding bug fix #61

merged 16 commits into from
Jun 11, 2024

Conversation

00salmon
Copy link
Contributor

@00salmon 00salmon commented Jun 6, 2024

Description of the change

Fixes issue decoding jwt's with special language characters
Example of previously breaking user object:

{
  "user": {
    "id": "testuser12",
    "accountId": "testuser12",
    "firstName": "Frénch",
    "lastName": "Usér",
    "email": "[email protected]"
  }
} 

atob was incorrectly generating:

{
    "id": "testuser12",
    "accountId": "testuser12",
    "firstName": "Frénch",
    "lastName": "Usér",
    "email": "[email protected]"
}

Now any language character should now be acceptable in a jwt

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

  • Jira issue number: (PUT IT HERE)
  • Process.st launch checklist: (PUT IT HERE)

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

Copy link

github-actions bot commented Jun 6, 2024

A preview of e72f6c8 is uploaded and can be seen here:

https://saasquatch.github.io/squatch-js/pull/61

@00salmon 00salmon changed the title Fix base64 decode [Bug fix] Decoding bug fix Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

size-limit report 📦

Path Size
dist/squatch.js 12.14 KB (+0.72% 🔺)

Locrian24
Locrian24 previously approved these changes Jun 11, 2024
Copy link
Contributor

@Locrian24 Locrian24 left a comment

Choose a reason for hiding this comment

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

Those test cases 😍

@00salmon 00salmon merged commit d267386 into master Jun 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants