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

Only issue invalid base64 warning on successful decode #601

Closed
wants to merge 1 commit into from

Commits on Jun 16, 2024

  1. Only issue invalid base64 warning on successful decode

    To make the patch minimally invasive, this attempts to decode the
    given jwt in strict base64 mode only after a successful full
    decode and validation.
    
    Most jwts are small, so this should have minimal performance
    impact, though it does require decoding twice.  It is possible to
    fix the issue and only decode once, but it would be more invasive.
    
    A big advantage of this approach is the use of :uplevel when
    calling Kernel#warn, so that the calling location that triggers
    the warning is included in the warning message, greatly simplifying
    debugging.
    
    Co-authored-by: Joakim Antman <antmanj@gmail.com>
    jeremyevans and anakinj committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    5db30c9 View commit details
    Browse the repository at this point in the history