Skip to content

Fix list iteration in claim format validation#375

Merged
rjeffman merged 3 commits into
latchset:mainfrom
simo5:aud_fmt
Apr 8, 2026
Merged

Fix list iteration in claim format validation#375
rjeffman merged 3 commits into
latchset:mainfrom
simo5:aud_fmt

Conversation

@simo5
Copy link
Copy Markdown
Member

@simo5 simo5 commented Apr 8, 2026

Update the validation logic to iterate over the items in claims[name] rather than the claims dictionary itself. This fixes a bug where list-based claims (such as multiple audiences) were not correctly checking if all elements were strings. A test for 'aud' claim type validation has been added to prevent future regressions.

Credit to @0xHunSec for reporting this although it was rejected as a security issue, because this flaw gives no security bypass abilities, it is just a bug.

simo5 and others added 2 commits April 8, 2026 10:24
Update the validation logic to iterate over the items in claims[name] rather
than the claims dictionary itself. This fixes a bug where list-based claims
(such as multiple audiences) were not correctly checking if all elements were
strings. A test for 'aud' claim type validation has been added to prevent
future regressions.

Co-authored-by: Gemini <gemini@google.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
Add Python 3.14 to the tox environment testing list to ensure compatibility
with the upcoming Python release. Additionally, update the basepython version
from 3.13 to 3.14 for all utility and documentation environments (lint, pep8,
doc, sphinx, doctest, codespell) to utilize the newest interpreter.

Signed-off-by: Simo Sorce <simo@redhat.com>
Add Python 3.14 to the GitHub Actions test matrix to ensure compatibility with
the upcoming release. Set Python 3.14 as the default version for utility jobs
like linting, docs, and formatting. Additionally, upgrade actions/checkout and
actions/setup-python to v6 to keep workflow dependencies current.

Signed-off-by: Simo Sorce <simo@redhat.com>
@simo5 simo5 requested review from rjeffman April 8, 2026 14:34
Copy link
Copy Markdown
Collaborator

@rjeffman rjeffman left a comment

Choose a reason for hiding this comment

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

LTGM.

Copy link
Copy Markdown
Collaborator

@rjeffman rjeffman left a comment

Choose a reason for hiding this comment

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

Changes looks good.

@rjeffman rjeffman merged commit d9aef6d into latchset:main Apr 8, 2026
29 of 30 checks passed
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