Skip to content

Conversation

@ADScanPro
Copy link

Fixes issue where dissectPayl() function failed when encountering nested dict structures (e.g., resource_access['account'] = {'roles': [...]}).

The original code attempted to call castInput() on dict objects, which caused json.loads() to fail with TypeError: the JSON object must be str, bytes or bytearray, not OrderedDict.

Solution: Added type checking to handle nested dicts and lists before attempting to parse them as strings. Now properly displays nested JSON structures with proper indentation.

Fixes parsing of tokens with complex nested structures like Keycloak tokens containing resource_access and realm_access objects.

Fixed issue where dissectPayl() function failed when encountering
nested dict structures (e.g., resource_access['account'] = {'roles': [...]}).

The original code attempted to call castInput() on dict objects,
which caused json.loads() to fail with TypeError: the JSON object must
be str, bytes or bytearray, not OrderedDict.

Solution: Added type checking to handle nested dicts and lists before
attempting to parse them as strings. Now properly displays nested
JSON structures with proper indentation.

Fixes parsing of tokens with complex nested structures like Keycloak
tokens containing resource_access and realm_access objects.
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