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

Modified isJWT to use urlsafe base64 (also added) #1316

Merged
merged 5 commits into from
May 27, 2020
Merged

Modified isJWT to use urlsafe base64 (also added) #1316

merged 5 commits into from
May 27, 2020

Conversation

parasg1999
Copy link
Contributor

Handles conflicts in #1277
closes #964 and closes #962

@profnandaa
Copy link
Member

Can fix the new merge conflicts?

@parasg1999
Copy link
Contributor Author

@profnandaa Resolved conflicts!

@profnandaa profnandaa added the 🧹 needs-update For PRs that need to be updated before landing label May 27, 2020
@profnandaa
Copy link
Member

Can remove the unrelated changes from the diff, showing 32 files touched. Make sure you've rebased with the latest master.

@parasg1999
Copy link
Contributor Author

@profnandaa Sorry for that. Have fixed it.

Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

LGTM. Will ask for extra pair of eyes from @ezkemboi / @tux-tn / @rubiin

@profnandaa profnandaa added needs-more-review and removed 🧹 needs-update For PRs that need to be updated before landing labels May 27, 2020
Copy link
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

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

Lets have a consistent variable naming. Use camelcase instead of pascal case for variable UrlSafeBase64 . Besides that , everything else looks good

@parasg1999
Copy link
Contributor Author

@profnandaa @rubiin Fixed it! Please check.

Copy link
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

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

looks good

export default function isBase64(str) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var urlSafeBase64 = /^[A-Z0-9_\-]+$/i;
var default_base64_options = {
Copy link
Member

Choose a reason for hiding this comment

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

minor: for the camelCase consistency...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Has been fixed now! @profnandaa

@profnandaa profnandaa merged commit 4407421 into validatorjs:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isJWT bug isBase64 - URL Safe Encoded Check
3 participants