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: Enforce UTF-8 encoding in response body parsing #70

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

akaegi
Copy link
Contributor

@akaegi akaegi commented Apr 17, 2024

Description

I got an issue of a wrong character encoding in the response from the userinfo endpoint when the user name contains non-ASCII characters.
This stems from the fact that http library falls back to latin encoding (http-1.2.0/lib/src/utils.dart:encodingForCharset) when the Content-Type header in the userinfo response only says application-json instead of application-json; charset=utf-8. However utf-8 is the default for application/json so oidc library should handle this gracefully ;-)

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@akaegi
Copy link
Contributor Author

akaegi commented Apr 18, 2024

@ahmednfwela Could you check why the pipeline is "stuck" for all PRs?

@ahmednfwela ahmednfwela changed the title Enforce UTF-8 encoding in response body parsing fix: Enforce UTF-8 encoding in response body parsing Apr 23, 2024
@ahmednfwela ahmednfwela merged commit bdee646 into Bdaya-Dev:main Jun 8, 2024
12 checks passed
@akaegi akaegi deleted the feature/utf-8-fix branch October 13, 2024 15:30
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