kilork / openid

OpenID Connect Rust Library
The Unlicense
63 stars 22 forks source link

`decode_token` may panic #23

Closed ctron closed 3 years ago

ctron commented 3 years ago

To me it looks like decode_token may panic, due to the use of unimplemented!.

So if a user provided token contains a algorithm which is not supported, that could let the function panic.

I think handling the situation gracefully, with a proper error return, would be better.

kilork commented 3 years ago

I think it is an issue, which I introduced during library version upgrade, we should introduce just normal error to not break everything in panic.

ctron commented 3 years ago

Awesome! Thank you for the quick fix and release!

kilork commented 3 years ago

You are welcome :)