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

Use io.ReadFull to ensure that generated jwk match the expected keysize #1064

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

vihangm
Copy link
Contributor

@vihangm vihangm commented Jan 24, 2024

io.Reader.Read docs say the following:

If some data is available but not len(p) bytes, Read conventionally returns what is available instead of waiting for more.

We need to use io.ReadFull or rand.Read (which in turn calls ReadFull) to ensure that we fill the entire buffer.

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (0a15b4d) 72.00% compared to head (3a96973) 72.40%.
Report is 34 commits behind head on develop/v2.

Files Patch % Lines
internal/keyconv/keyconv.go 42.42% 16 Missing and 3 partials ⚠️
jwt/openid/birthdate.go 76.47% 4 Missing ⚠️
jwe/jwe.go 91.66% 2 Missing and 1 partial ⚠️
jwe/internal/aescbc/aescbc.go 85.71% 1 Missing and 1 partial ⚠️
jwe/options_gen.go 92.30% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           develop/v2    #1064      +/-   ##
==============================================
+ Coverage       72.00%   72.40%   +0.39%     
==============================================
  Files              93       93              
  Lines           13795    13896     +101     
==============================================
+ Hits             9933    10061     +128     
+ Misses           3044     3020      -24     
+ Partials          818      815       -3     

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

@lestrrat
Copy link
Collaborator

LGTM. Thanks!

@lestrrat lestrrat merged commit d86010a into lestrrat-go:develop/v2 Jan 25, 2024
20 checks passed
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.

2 participants