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

fix decode base64 bug #1

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

fix decode base64 bug #1

wants to merge 1 commit into from

Conversation

hero5512
Copy link

@hero5512 hero5512 commented Mar 7, 2024

If the length of the binary array "msg" is not divisible by 3, it will be padded with zeros at the end before applying the base64 encoding rules. Because you pass all the msg (including '.'), you can only verify the length of msg can be divided by 3. To fix it up, before pass it to the regex, I shift left to get the body of the jwt.

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

Successfully merging this pull request may close these issues.

1 participant