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: Handle nested structures in castInput function #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HackJJ
Copy link

@HackJJ HackJJ commented Dec 10, 2024

  • Updated the castInput function to properly handle nested structures such as dictionaries and lists in JWT payloads.
  • Added recursive processing for dictionaries and lists to ensure all nested values are correctly cast.
  • Improved handling of string inputs, including JSON parsing, boolean conversion, and fallback cases.
  • Fixed a bug where lists in the payload caused a TypeError due to improper type handling in the previous implementation.

This change addresses issues encountered when processing complex JWT payloads with deeply nested structures, such as Salesforce-style claims. The updated function ensures the tool is more robust and capable of handling various input types without errors.

- Updated the `castInput` function to properly handle nested structures such as dictionaries and lists in JWT payloads.
- Added recursive processing for dictionaries and lists to ensure all nested values are correctly cast.
- Improved handling of string inputs, including JSON parsing, boolean conversion, and fallback cases.
- Fixed a bug where lists in the payload caused a `TypeError` due to improper type handling in the previous implementation.

This change addresses issues encountered when processing complex JWT payloads with deeply nested structures, such as Salesforce-style claims. The updated function ensures the tool is more robust and capable of handling various input types without errors.
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.

1 participant