This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
Mime: base64 encoded string must be multiple of 4 chars #2
Merged
Conversation
This file contains 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
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
*/ | ||
public function testEncodeMailHeaderBase64wrap($str) | ||
{ | ||
$this->assertEquals($str, Mime\Decode::decodeQuotedPrintable(Mime\Mime::encodeBase64Header($str, "UTF-8", 20))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you try to execute this test without "the fix"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were 2 failures:
1) ZendTest\Mime\MimeTest::testEncodeMailHeaderBase64wrap with data set #0 ('äöüäöüäöüäöüäö�...äöü')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'äöüäöüäöüäöüäöüäöüäöü'
+'äöü=?UTF-8?B?6TDtsO8w6?= =?UTF-8?B?TDtsO8w6T?= =?UTF-8?B?DtsO8w6TD?= =?UTF-8?B?tsO8w6TDt?= =?UTF-8?B?sO8w6TDts?= ;'
.../zend-mime/test/MimeTest.php:142
2) ZendTest\Mime\MimeTest::testEncodeMailHeaderBase64wrap with data set #1 ('Alle meine Entchen schwimmen ... Höh!')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Alle meine Entchen schwimmen in dem See, schwimmen in dem See, Köpfchen in das Wasser, Schwänzchen in die Höh!'
+'Alle m=?UTF-8?B?WluZSBFbn?= =?UTF-8?B?RjaGVuIHN?= =?UTF-8?B?jaHdpbW1l?= n in d=?UTF-8?B?W0gU2VlLC?= =?UTF-8?B?BzY2h3aW1?= =?UTF-8?B?tZW4gaW4g?= dem Se=?UTF-8?B?SwgS8O2cG?= =?UTF-8?B?ZjaGVuIGl?= =?UTF-8?B?uIGRhcyBX?= asser,=?UTF-8?B?FNjaHfDpG?= =?UTF-8?B?56Y2hlbiB?= =?UTF-8?B?pbiBkaWUg?= Höh!'
.../zend-mime/test/MimeTest.php:142
ping |
weierophinney
added a commit
that referenced
this pull request
Apr 20, 2016
Mime: base64 encoded string must be multiple of 4 chars
weierophinney
added a commit
that referenced
this pull request
Apr 20, 2016
weierophinney
pushed a commit
that referenced
this pull request
May 14, 2018
added another comment for better understanding
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
this fixes encodeBase64Header()