Skip to content

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

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

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

Conversation

@AberDerBart
Copy link
Copy Markdown
Contributor

@AberDerBart AberDerBart commented Aug 20, 2020

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
Copy link
Copy Markdown

codecov bot commented Aug 20, 2020

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 Files Coverage Δ
src/lib/isBase32.js 100.00% <100.00%> (ø)
src/lib/isBase64.js 100.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
Contributor Author

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

@AberDerBart
Copy link
Copy Markdown
Contributor Author

any update on this?

Copy link
Copy Markdown
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.
/cc. @tux-tn @ezkemboi -- can have a look?

Copy link
Copy Markdown
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@profnandaa profnandaa merged commit 491d9c0 into validatorjs:master Sep 6, 2020
@profnandaa profnandaa mentioned this pull request Sep 18, 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.

3 participants