MIME Tools v3.5: add codec enhancements, UTF-16LE Base64, RFC 2047 decoding, and SAML improvements - #39
Open
ExSlam wants to merge 24 commits into
Open
MIME Tools v3.5: add codec enhancements, UTF-16LE Base64, RFC 2047 decoding, and SAML improvements#39ExSlam wants to merge 24 commits into
ExSlam wants to merge 24 commits into
Conversation
Store the position of newline characters for each line and add a padding before the newline if necessary.
Add the Add base64EncodeWithPaddingByLine function to b64.h and b64.cpp. Add convertToBase64FromAscii_pad_byline() function to mimeTools.h and mimeTools.cpp.
Request to merge
- Optimize Base64 and Base64URL encoding and decoding - Remove unnecessary Base64URL buffer copies and translation passes - Make padded-by-line Base64 encoding single-pass - Make Quoted-Printable decoding linear-time - Reduce Scintilla selection copying - Restore push/PR Debug and Release builds for x64, Win32, and ARM64
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 brings the accumulated MIME Tools improvements from the fork back into the upstream repository and updates the plugin to v3.5.
The changes add new Base64, Base64URL, MIME header, and SAML functionality while also improving codec performance, buffer handling, build consistency, and CI coverage.
Main changes
Base64
Add Base64 Encode with padding by line.
Add Base64URL Encode and Base64URL Decode.
Add UTF-16LE Base64 Encode and Decode.
-EncodedCommand.Clarify the existing per-line decoder as Base64 Decode by line (padded/unpadded).
Optimize Base64 and Base64URL encoding/decoding.
Make padded-by-line Base64 encoding single-pass.
MIME / RFC 2047
B(Base64) andQencoded-words.Quoted-Printable
SAML
Fix the longstanding SAML Decode corruption issue where valid HTTP-Redirect SAML messages could decode into corrupted XML containing embedded NUL characters.
The root cause was truncation of DEFLATE length/distance base-table values in the bundled inflater.
Fix SAML Decode URL-error handling and a temporary Base64 buffer leak.
Addresses UTF8 Encoding issues for SAML Decode #5.
Add SAML Encode for the SAML 2.0 HTTP-Redirect binding:
Add a small dependency-free raw DEFLATE compressor for the encoding path.
SAML Encode and Decode can now be used as inverse operations for HTTP-Redirect payloads.
Safety and implementation cleanup
Build and CI
Make Visual Studio compile settings consistent across Win32, x64, and ARM64.
Enable additional compiler security checks and release optimizations.
Restore CI builds on pushes and pull requests.
Build both Debug and Release configurations for:
Version
Updates MIME Tools to v3.5.
Closes #5
Closes #14
Closes #37