Backport #8415
closedNet::IMAP#capability_response raises "Net::IMAP::ResponseParseError: unexpected token CRLF" for common CAPABILITY
Description
Unfortunately Apple's iCloud IMAP service returns a non-conforming CAPABILITY response which causes this parse error to be raised:
"* CAPABILITY st11p00mm-iscream009 1Q49 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN \r\n"
To reproduce:
require 'net/imap'
imap = Net::IMAP.new( 'imap.mail.me.com', 993, true )
imap.capability
To fix:
--- lib/ruby/2.0.0/net/imap.rb~ 2013-05-17 07:12:04.000000000 -0400
+++ lib/ruby/2.0.0/net/imap.rb 2013-05-17 07:13:05.000000000 -0400
@@ -2954,6 +2954,7 @@
break
when T_SPACE
shift_token
-
next end data.push(atom.upcase) end
This bug also applies to 1.8.7
Updated by shugo (Shugo Maeda) over 11 years ago
- Status changed from Open to Assigned
- Assignee set to shugo (Shugo Maeda)
Updated by shugo (Shugo Maeda) about 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r41091.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
-
lib/net/imap.rb (capability_response): should ignore trailing
spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415] -
test/net/imap/test_imap_response_parser.rb: related test.
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
lib) - Status changed from Closed to Assigned
- Assignee changed from shugo (Shugo Maeda) to nagachika (Tomoyuki Chikanaga)
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r41188.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 41091: [Backport #8415]
* lib/net/imap.rb (capability_response): should ignore trailing
spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415]
* test/net/imap/test_imap_response_parser.rb: related test.
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Project changed from Backport200 to Backport193
- Status changed from Closed to Assigned
- Assignee changed from nagachika (Tomoyuki Chikanaga) to usa (Usaku NAKAMURA)
This is needed also in 1.9.3?
I move this ticket to Backport93 just for memorandum.
Updated by usa (Usaku NAKAMURA) about 11 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r41647.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 41091: [Backport #8415]
* lib/net/imap.rb (capability_response): should ignore trailing
spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415]
* test/net/imap/test_imap_response_parser.rb: related test.