View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002126 | SOGo | Backend Mail | public | 2012-11-27 13:32 | 2013-01-14 19:31 |
Reporter | eicky | Assigned To | francis | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.0.2a | ||||
Target Version | 2.0.4 | Fixed in Version | 2.0.4 | ||
Summary | 0002126: SMTP PLAIN AUTH fails with long login-phrases | ||||
Description | SMTP PLAIN AUTH fails, if the base64-encoded login-phrase is longer than 72 chars. If the encoded login-phrase is longer, a second line is used for authentication and the mailserver rejects the attempt. A login with shorter phrases was tested successfully. | ||||
Additional Information | Here's the SOGo-Log for one of my login attemts, that failed because of the C: connect to <0x0x7f00fa002090[NGInternetSocketAddress]: I replaced the AUTH PLAIN string for security reasons, but the length still | ||||
Tags | No tags attached. | ||||
Fixed: https://github.com/inverse-inc/sope/commit/180ee5442d3245265a993de4c565271bc6c5c142 |
|
I'm sorry to report, that the issue still persists. The Output of SMTP AUTH with SOGo 2.0.3: C: connect to <0x0x7fd08b958690[NGInternetSocketAddress]: host=smtp.example.org not-filled> I replaced the AUTH PLAIN string for security reasons, but the length still |
|
EDIT: My original post was plain wrong and missleading, removed it later. After playing around with it, I learned, that the linebreak indeed causes the error. Simpling replacing all "\n" in the authstring with "" solved the problem. Simple fix included. |
|
2013-01-11 17:34
|
fix_2126 (829 bytes)
diff --git a/sope-mime/NGMail/NGSmtpClient.m b/sope-mime/NGMail/NGSmtpClient.m index bb5daba..781ddd3 100644 --- a/sope-mime/NGMail/NGSmtpClient.m +++ b/sope-mime/NGMail/NGSmtpClient.m @@ -237,10 +237,10 @@ buffer = malloc (sizeof (char) * (buflen + 1)); sprintf (buffer, "%s%c%s%c%s", utf8Username, 0, utf8Username, 0, utf8Password); - authString = [[NSData dataWithBytesNoCopy: buffer + authString = [[[NSData dataWithBytesNoCopy: buffer length: buflen freeWhenDone: YES] - stringByEncodingBase64]; + stringByEncodingBase64] stringByReplacingOccurrencesOfString:@"\n" withString:@""]; reply = [self sendCommand: @"AUTH PLAIN"]; if ([reply code] == NGSmtpServerChallenge) |
Thanks. See https://github.com/inverse-inc/sope/commit/9c3999fadcf3b5e2de9dfbf21756eaa4b7d41e54 |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-27 13:32 | eicky | New Issue | |
2012-11-30 21:17 | ludovic | Target Version | => 2.0.3 |
2012-12-03 21:28 | ludovic | Note Added: 0005022 | |
2012-12-03 21:28 | ludovic | Status | new => closed |
2012-12-03 21:28 | ludovic | Resolution | open => fixed |
2012-12-03 21:28 | ludovic | Fixed in Version | => 2.0.3 |
2012-12-07 12:09 | eicky | Note Added: 0005047 | |
2012-12-07 12:09 | eicky | Status | closed => feedback |
2012-12-07 12:09 | eicky | Resolution | fixed => reopened |
2013-01-11 13:06 | jobisoft | Note Added: 0005132 | |
2013-01-11 17:32 | jobisoft | Note Edited: 0005132 | |
2013-01-11 17:34 | jobisoft | File Added: fix_2126 | |
2013-01-13 12:55 | jobisoft | Note Edited: 0005132 | |
2013-01-14 15:05 | francis | Target Version | 2.0.3 => 2.0.4 |
2013-01-14 19:31 | francis | Note Added: 0005171 | |
2013-01-14 19:31 | francis | Status | feedback => resolved |
2013-01-14 19:31 | francis | Fixed in Version | 2.0.3 => 2.0.4 |
2013-01-14 19:31 | francis | Resolution | reopened => fixed |
2013-01-14 19:31 | francis | Assigned To | => francis |