Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF7 code doesn't encode 0x7F character as BASE64. #149

Open
TSlivede opened this issue Sep 27, 2018 · 1 comment
Open

UTF7 code doesn't encode 0x7F character as BASE64. #149

TSlivede opened this issue Sep 27, 2018 · 1 comment

Comments

@TSlivede
Copy link

TSlivede commented Sep 27, 2018

Pointed out by Aleksey on stackoverflow:

Line 347 in Util.cs should be
if (codepoint > 0x1F && codepoint < 0x7F) {
instead of
if (codepoint > 0x1F && codepoint < 0x80) {

Line 354 in Util.cs should be
if (codepoint > 0x1F && codepoint < 0x7F)
instead of
if (codepoint > 0x1F && codepoint < 0x80)

because according to RFC-3501

[...] All other characters (octet values 0x00-0x1f and 0x7f-0xff) are represented in modified BASE64 [...]

0x7F should not be passed through unencoded, because it is a control character (DEL) and not a printable ASCII-character.

@TSlivede TSlivede changed the title Base64 doesn't encode 0x7F character correctly. Base64 code doesn't encode 0x7F character correctly. Sep 27, 2018
@TSlivede TSlivede changed the title Base64 code doesn't encode 0x7F character correctly. UTF7 code doesn't encode 0x7F character as BASE64. Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@TSlivede and others