Hello,
Thanks for this great library.
The problem occurs when users try to use the encode function.
Inside encode at line 189 you call the sign method, which crashes the whole application when failing. In ATAC, users may use custom stuff and it will lead to crashes.
|
let signature = b64_encode(signing_provider.sign(message.as_bytes())); |
It would be better to use the try_sign method, which will not crash.
If you don't want such a thing, then it would be great to have a try_encode function.
Have a great day
Hello,
Thanks for this great library.
The problem occurs when users try to use the
encodefunction.Inside
encodeat line 189 you call thesignmethod, which crashes the whole application when failing. In ATAC, users may use custom stuff and it will lead to crashes.jsonwebtoken/src/encoding.rs
Line 189 in 53a3fc2
It would be better to use the
try_signmethod, which will not crash.If you don't want such a thing, then it would be great to have a
try_encodefunction.Have a great day