kataras / kataras/jwt

Audience parsing doesn't reject unexpected items

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
212
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Because there's no `default:` branch erroring out, I could smuggle any valid JSON there, like `true`, `false`, `null`, any number or an object.

https://github.com/kataras/jwt/blob/1639fcff96f82f7ff118fcff6e1fbd0e01754f2c/claims.go#L69

They'll simply be discarded.

I don't know if there's security implications, might not because because header and payload are signed by the issuer, and any tampering would get detected. But since I can't for 100 % say it's a non-issue, I'd feel more comfortable rejecting the data that would get discarded otherwise.

WDYT?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.