security: replace unmaintained encoding crate with encoding_rs#704
Open
joaommartins wants to merge 2 commits intoEnet4:masterfrom
Open
security: replace unmaintained encoding crate with encoding_rs#704joaommartins wants to merge 2 commits intoEnet4:masterfrom
joaommartins wants to merge 2 commits intoEnet4:masterfrom
Conversation
940afca to
6ae60a2
Compare
Author
|
Bump @Enet4 |
Contributor
|
ping @Enet4 |
- Replace encoding 0.2.33 with encoding_rs 0.8.35 to resolve RUSTSEC-2021-0153 - Rewrite text encoding implementation while preserving TextCodec API compatibility - Maintain support for all DICOM character sets (ISO-IR variants, UTF-8, CJK encodings) - Add special handling for ISO-2022-JP encoding compatibility - All existing tests pass, confirming no functional regressions Fixes: RUSTSEC-2021-0153 (Use after free in encoding crate)
76f617b to
213197d
Compare
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.
Summary
This PR resolves the security vulnerability RUSTSEC-2021-0153 by replacing the unmaintained
encodingcrate with the actively maintainedencoding_rscrate.Changes Made
encoding/Cargo.tomlto useencoding_rs = "0.8.35"instead ofencoding = "0.2.33".encoding/src/text.rsusingencoding_rswhile maintaining full backward compatibility with the existingTextCodectrait interface.Character Set Mapping:
encoding→encoding_rsencoding)encoding_rs)encoding::all::ASCIIWINDOWS_1252encoding::all::WINDOWS_31JSHIFT_JISencoding::all::ISO_2022_JPISO_2022_JPencoding::all::ISO_8859_1WINDOWS_1252encoding::all::ISO_8859_2ISO_8859_2encoding::all::ISO_8859_3ISO_8859_3encoding::all::ISO_8859_4ISO_8859_4encoding::all::ISO_8859_7ISO_8859_7encoding::all::ISO_8859_6ISO_8859_6encoding::all::ISO_8859_8ISO_8859_8encoding::all::ISO_8859_5ISO_8859_5encoding::all::WINDOWS_949EUC_KRencoding::all::WINDOWS_874WINDOWS_874encoding::all::UTF_8UTF_8encoding::all::GB18030GB18030encoding::all::GBKGBKKey Compatibility Notes:
encoding_rsdid not have a 1:1 encoding available.encoding_rsmappings are supersets or exact equivalents of the original character sets.Testing
cargo deny check advisories- no security vulnerabilities remain.Closes #577 .