Fix decoding strings that contain '=?', but are not actually encoded#509
Closed
javan wants to merge 2 commits intomikel:masterfrom
Closed
Fix decoding strings that contain '=?', but are not actually encoded#509javan wants to merge 2 commits intomikel:masterfrom
javan wants to merge 2 commits intomikel:masterfrom
Conversation
Contributor
|
Seeing this problem too. 👍 |
Collaborator
|
Glad to see this fixed! However, the test should pass with those first two lines removed, considering that's meant as an optimization to short circuit the transfer-encoding checks. |
Contributor
Author
|
They don't currently pass with those two lines removed. |
Collaborator
|
Unpossible 😮 |
Contributor
Author
|
I pushed a possible alternative, 1130801 I stand by the first approach though. The comment with that optimization states "If there's no encoded-words in the string, just return it", but it doesn't work. It thinks '1+1=?' is an encoded string, and passes that string along to Let me know what you think. I can work up a new PR. |
Collaborator
|
Cool—pushed your first fix! 700ba21 |
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.
I ran into an exception today when sending an email that contained "1+1=?" in the subject.
Here's a test (not included in the commit) to simulate that failure:
This fixes the problem by checking more closely (with a regex) to see if the string actually is encoded before proceeding.