Skip to content

fix isBase64 and isBase32 seeing empty string as invalid, fixes #1418 - #1419

Merged
profnandaa merged 1 commit into
validatorjs:masterfrom
AberDerBart:master
Sep 6, 2020
Merged

fix isBase64 and isBase32 seeing empty string as invalid, fixes #1418#1419
profnandaa merged 1 commit into
validatorjs:masterfrom
AberDerBart:master

Conversation

@AberDerBart

@AberDerBartAberDerBart commented Aug 20, 2020

Copy link
Copy Markdown
Contributor

isBase64('') and isBase32('') now return true, which is correct behaviour according to RFC4648

Upon regeneration of the code, there were some additional files changes, I am not sure if this is right, so I made a seperate commit.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@profnandaa

Copy link
Copy Markdown
Member

@AberDerBart -- Thanks for the PR! 🎉 please remove all the unrelated changes from the diff to make it easy for reviewing.

@codecov

codecovBot commented Aug 20, 2020

Copy link
Copy Markdown

Codecov Report

Merging #1419 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@## master #1419 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 95 95 Lines 1254 1254 =========================================
Hits 1254 1254 
Impacted FilesCoverage Δ
src/lib/isBase32.js100.00% <100.00%> (ø)
src/lib/isBase64.js100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db0a402...a48221a. Read the comment docs.

@AberDerBart

Copy link
Copy Markdown
ContributorAuthor

@profnandaa done. Note that also the code for isBase32 and isBase64 is not generated.

@AberDerBart

Copy link
Copy Markdown
ContributorAuthor

any update on this?

@profnandaaprofnandaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.
/cc. @tux-tn@ezkemboi -- can have a look?

@tux-tntux-tn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🎉

Sign up for freeto 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.

3 participants

@AberDerBart@profnandaa@tux-tn