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

Enable validation when decoding base64 data #875

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

SrirachaHorse
Copy link
Contributor

📒 Description

Enables validation on calls to base64.b64decode() so that both base16 and base64 will raise a ConverterError if invalid characters are decoded.

Resolves #874

🔗 What I've Done

Pass validate=True to b64decode() method. Also implemented a unit test to exercise the behavior.

💬 Comments

None

🛫 Checklist

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (057b6ee) 99.89% compared to head (797c7a6) 99.89%.
Report is 2 commits behind head on main.

❗ Current head 797c7a6 differs from pull request most recent head c9cf28e. Consider uploading reports for the commit c9cf28e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
- Coverage   99.89%   99.89%   -0.01%     
==========================================
  Files         105      105              
  Lines        9304     9302       -2     
  Branches     2079     2078       -1     
==========================================
- Hits         9294     9292       -2     
  Misses          3        3              
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Owner

@tefra tefra left a comment

Choose a reason for hiding this comment

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

Thank you!

@tefra tefra merged commit 41628c5 into tefra:main Dec 8, 2023
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.

Deserializing invalid characters in a base64 string does not raise an error
2 participants