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

47: add support for handling name bytes if they have nul #50

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

jac18281828
Copy link
Contributor

closes #47

  • fixes documentation
  • add documentation test to ci

@jac18281828 jac18281828 self-assigned this Feb 14, 2024
@jac18281828 jac18281828 added the bug Something isn't working label Feb 14, 2024
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

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

Comparison is base (bb2c7d6) 97.25% compared to head (fb93d06) 97.24%.

Files Patch % Lines
lib/src/types/ethr.rs 94.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
- Coverage   97.25%   97.24%   -0.01%     
==========================================
  Files          13       13              
  Lines        2953     3054     +101     
==========================================
+ Hits         2872     2970      +98     
- Misses         81       84       +3     

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

@insipx
Copy link
Contributor

insipx commented Feb 14, 2024

Thanks for the docs updates!

Is it possible that this could also stem from #49?

Maybe worth a try resolving on that branch. I'm a little apprehensive towards the unsafe{} but will have to take a closer look tomorrow

-- what did the issue actually turn out to be, is to_string_lossy handling null bytes incorrectly?

@jac18281828
Copy link
Contributor Author

Thanks for the docs updates!

Is it possible that this could also stem from #49?

Maybe worth a try resolving on that branch. I'm a little apprehensive towards the unsafe{} but will have to take a closer look tomorrow

-- what did the issue actually turn out to be, is to_string_lossy handling null bytes incorrectly?

Yes, if it’s any consolation I felt the same way about unsafe but copied it directly from the example here so I thought it may be proper:

https://doc.rust-lang.org/std/ffi/struct.CStr.html

The nul bytes evidently confuse the parser. Perhaps they do not match the character class, anyway we should filter them somewhere.

We can discuss both prs tomorrow.

lib/src/resolver/did_registry.rs Outdated Show resolved Hide resolved
lib/src/types/did_parser.rs Show resolved Hide resolved
@jac18281828 jac18281828 force-pushed the jac/attrparse branch 2 times, most recently from 9a1ba5f to 5e9061f Compare February 16, 2024 00:20
@insipx
Copy link
Contributor

insipx commented Feb 16, 2024

nice, odd bug glad you found it

 - fixes documentation
 - add documentation test to ci
@jac18281828 jac18281828 merged commit fb93d06 into main Feb 16, 2024
4 of 6 checks passed
@jac18281828 jac18281828 deleted the jac/attrparse branch February 16, 2024 19:05
@jac18281828 jac18281828 mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bug: Resolution fails for existing attributes
2 participants