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

not check typ in jwt header #36

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

Conversation

SukitOwl
Copy link
Contributor

@SukitOwl SukitOwl commented Jul 8, 2020

No description provided.

@@ -152,10 +152,6 @@ fostlib::nullable<fostlib::jwt::token> fostlib::jwt::token::load(
const auto u8_header = coerce<utf8_string>(v64_header);
const auto str_header = coerce<string>(u8_header);
const auto header = json::parse(str_header);
if (header["typ"] != jwt) {
log::warning(c_fost)("", "JWT type mismatch")("typ", header["typ"]);
return fostlib::null;
Copy link
Member

Choose a reason for hiding this comment

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

Can we leave the warning, but just remove the early return? I think it's clear it's meant to be there and I'd rather the code looks like it's not missed something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants