cksum/hashsum: Support for non-UTF-8 input in checksum files#6793
Merged
cakebaker merged 6 commits intouutils:mainfrom Oct 24, 2024
Merged
cksum/hashsum: Support for non-UTF-8 input in checksum files#6793cakebaker merged 6 commits intouutils:mainfrom
cakebaker merged 6 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
febab10 to
71bc35b
Compare
71bc35b to
7fa39e4
Compare
|
GNU testsuite comparison: |
050ad32 to
91c1cd8
Compare
Collaborator
Author
|
I closed the PR by mistake, wanted to mark it as ready :/ |
91c1cd8 to
57ac761
Compare
|
GNU testsuite comparison: |
3285e74 to
953fa37
Compare
Collaborator
Author
|
@cakebaker @BenWiederhake |
|
GNU testsuite comparison: |
Contributor
|
@RenjiSann sorry, there are some conflicts :| |
953fa37 to
838d433
Compare
Collaborator
Author
Fixed ! 😁 |
|
GNU testsuite comparison: |
838d433 to
61ca177
Compare
sylvestre
reviewed
Oct 23, 2024
cakebaker
reviewed
Oct 23, 2024
|
GNU testsuite comparison: |
cakebaker
reviewed
Oct 23, 2024
61ca177 to
7e45735
Compare
23d0c71 to
ebe53e0
Compare
|
GNU testsuite comparison: |
cakebaker
reviewed
Oct 23, 2024
cakebaker
reviewed
Oct 23, 2024
178cc03 to
50bfa3d
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
The full line will be matched against the selected regex anyway
463c959 to
6030ad9
Compare
|
GNU testsuite comparison: |
Collaborator
Author
|
Ready for what should be a final review :) |
Contributor
|
Thanks :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second part of splitting #6603.
This PR adds support for non-UTF-8 checksum file content for
cksumandhashsumvalidation tools.In practice, given a CHECKSUM file with the following content, non-UTF-8 characters can appear in 2 places:
All the other places are either algorithm name, which should be ASCII, or hexa/base64 digest, which should be ASCII as well.
The most important step is to get rid of the call to
BufRead::lines()to iterate on the lines of the CHECKSUM file, otherwise, it panics on non-UTF-8 characters.This change makes heavy use of
String/OsString/Vec<u8>conversion, which happen to not be equally treated on all platforms.