ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:81641] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
       [not found] <redmine.issue-13649.20170609173516@ruby-lang.org>
@ 2017-06-09 17:35 ` carlier.jeremy
  2017-07-14  9:26 ` [ruby-core:82063] [Ruby trunk Bug#13649][Assigned] " naruse
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: carlier.jeremy @ 2017-06-09 17:35 UTC (permalink / raw
  To: ruby-core

Issue #13649 has been reported by keysen (Jérémy Carlier).

----------------------------------------
Bug #13649: Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
https://bugs.ruby-lang.org/issues/13649

* Author: keysen (Jérémy Carlier)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.3.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Hello,

This day I wanted to use a mailbox hosted on a Microsoft Exchange server and it was not working.
I found this nice article relating the issue: http://claudiofloreani.blogspot.fr/2012/01/monkeypatching-ruby-imap-class-to-build.html

My solution to support those crappy server:

```ruby
module Net
  class IMAP
    class ResponseParser
      def response
        token = lookahead
        case token.symbol
        when T_PLUS
          result = continue_req
        when T_STAR
          result = response_untagged
        else
          result = response_tagged
        end
        match(T_SPACE) if lookahead.symbol == T_SPACE
        match(T_CRLF)
        match(T_EOF)
        return result
      end
    end
  end
end
```

Step to reproduce: (require an horrible server :))

```ruby
imap_connexion = Net::IMAP.new(localhost, 993, true, nil, false)
imap_connexion.status('INBOX', ["UIDNEXT", "UIDVALIDITY"])
```
Then the server should reply with:
"* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1585372) \r\n"

And the bug occurs because we have a space at the end of the line which is not in the RFC, but as usual Microsoft makes its own RFC...

If you have any questions, suggestions just ask, if I can help.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:82063] [Ruby trunk Bug#13649][Assigned] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
       [not found] <redmine.issue-13649.20170609173516@ruby-lang.org>
  2017-06-09 17:35 ` [ruby-core:81641] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards) carlier.jeremy
@ 2017-07-14  9:26 ` naruse
  2017-12-20 15:31 ` [ruby-core:84372] [Ruby trunk Bug#13649] " nagachika00
  2018-01-31 11:26 ` [ruby-core:85292] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2017-07-14  9:26 UTC (permalink / raw
  To: ruby-core

Issue #13649 has been updated by naruse (Yui NARUSE).

Status changed from Open to Assigned
Assignee set to shugo (Shugo Maeda)

----------------------------------------
Bug #13649: Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
https://bugs.ruby-lang.org/issues/13649#change-65797

* Author: keysen (Jérémy Carlier)
* Status: Assigned
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Target version: 
* ruby -v: 2.3.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Hello,

This day I wanted to use a mailbox hosted on a Microsoft Exchange server and it was not working.
I found this nice article relating the issue: http://claudiofloreani.blogspot.fr/2012/01/monkeypatching-ruby-imap-class-to-build.html

My solution to support those crappy server:

```ruby
module Net
  class IMAP
    class ResponseParser
      def response
        token = lookahead
        case token.symbol
        when T_PLUS
          result = continue_req
        when T_STAR
          result = response_untagged
        else
          result = response_tagged
        end
        match(T_SPACE) if lookahead.symbol == T_SPACE
        match(T_CRLF)
        match(T_EOF)
        return result
      end
    end
  end
end
```

Step to reproduce: (require an horrible server :))

```ruby
imap_connexion = Net::IMAP.new(localhost, 993, true, nil, false)
imap_connexion.status('INBOX', ["UIDNEXT", "UIDVALIDITY"])
```
Then the server should reply with:
"* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1585372) \r\n"

And the bug occurs because we have a space at the end of the line which is not in the RFC, but as usual Microsoft makes its own RFC...

If you have any questions, suggestions just ask, if I can help.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:84372] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
       [not found] <redmine.issue-13649.20170609173516@ruby-lang.org>
  2017-06-09 17:35 ` [ruby-core:81641] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards) carlier.jeremy
  2017-07-14  9:26 ` [ruby-core:82063] [Ruby trunk Bug#13649][Assigned] " naruse
@ 2017-12-20 15:31 ` nagachika00
  2018-01-31 11:26 ` [ruby-core:85292] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2017-12-20 15:31 UTC (permalink / raw
  To: ruby-core

Issue #13649 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.2: WONTFIX, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: WONTFIX, 2.3: REQUIRED, 2.4: DONE

ruby_2_4 r61369 merged revision(s) 59372.

----------------------------------------
Bug #13649: Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
https://bugs.ruby-lang.org/issues/13649#change-68561

* Author: keysen (Jérémy Carlier)
* Status: Closed
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Target version: 
* ruby -v: 2.3.1
* Backport: 2.2: WONTFIX, 2.3: REQUIRED, 2.4: DONE
----------------------------------------
Hello,

This day I wanted to use a mailbox hosted on a Microsoft Exchange server and it was not working.
I found this nice article relating the issue: http://claudiofloreani.blogspot.fr/2012/01/monkeypatching-ruby-imap-class-to-build.html

My solution to support those crappy server:

```ruby
module Net
  class IMAP
    class ResponseParser
      def response
        token = lookahead
        case token.symbol
        when T_PLUS
          result = continue_req
        when T_STAR
          result = response_untagged
        else
          result = response_tagged
        end
        match(T_SPACE) if lookahead.symbol == T_SPACE
        match(T_CRLF)
        match(T_EOF)
        return result
      end
    end
  end
end
```

Step to reproduce: (require an horrible server :))

```ruby
imap_connexion = Net::IMAP.new(localhost, 993, true, nil, false)
imap_connexion.status('INBOX', ["UIDNEXT", "UIDVALIDITY"])
```
Then the server should reply with:
"* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1585372) \r\n"

And the bug occurs because we have a space at the end of the line which is not in the RFC, but as usual Microsoft makes its own RFC...

If you have any questions, suggestions just ask, if I can help.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:85292] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
       [not found] <redmine.issue-13649.20170609173516@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-12-20 15:31 ` [ruby-core:84372] [Ruby trunk Bug#13649] " nagachika00
@ 2018-01-31 11:26 ` usa
  3 siblings, 0 replies; 4+ messages in thread
From: usa @ 2018-01-31 11:26 UTC (permalink / raw
  To: ruby-core

Issue #13649 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.2: WONTFIX, 2.3: REQUIRED, 2.4: DONE to 2.2: WONTFIX, 2.3: DONE, 2.4: DONE

ruby_2_3 r62131 merged revision(s) 59372.

----------------------------------------
Bug #13649: Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards)
https://bugs.ruby-lang.org/issues/13649#change-70073

* Author: keysen (Jérémy Carlier)
* Status: Closed
* Priority: Normal
* Assignee: shugo (Shugo Maeda)
* Target version: 
* ruby -v: 2.3.1
* Backport: 2.2: WONTFIX, 2.3: DONE, 2.4: DONE
----------------------------------------
Hello,

This day I wanted to use a mailbox hosted on a Microsoft Exchange server and it was not working.
I found this nice article relating the issue: http://claudiofloreani.blogspot.fr/2012/01/monkeypatching-ruby-imap-class-to-build.html

My solution to support those crappy server:

```ruby
module Net
  class IMAP
    class ResponseParser
      def response
        token = lookahead
        case token.symbol
        when T_PLUS
          result = continue_req
        when T_STAR
          result = response_untagged
        else
          result = response_tagged
        end
        match(T_SPACE) if lookahead.symbol == T_SPACE
        match(T_CRLF)
        match(T_EOF)
        return result
      end
    end
  end
end
```

Step to reproduce: (require an horrible server :))

```ruby
imap_connexion = Net::IMAP.new(localhost, 993, true, nil, false)
imap_connexion.status('INBOX', ["UIDNEXT", "UIDVALIDITY"])
```
Then the server should reply with:
"* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1585372) \r\n"

And the bug occurs because we have a space at the end of the line which is not in the RFC, but as usual Microsoft makes its own RFC...

If you have any questions, suggestions just ask, if I can help.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-31 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-13649.20170609173516@ruby-lang.org>
2017-06-09 17:35 ` [ruby-core:81641] [Ruby trunk Bug#13649] Net::IMAP doesn't support response from a Microsoft Exchange server (which is not compliant with RFC standards) carlier.jeremy
2017-07-14  9:26 ` [ruby-core:82063] [Ruby trunk Bug#13649][Assigned] " naruse
2017-12-20 15:31 ` [ruby-core:84372] [Ruby trunk Bug#13649] " nagachika00
2018-01-31 11:26 ` [ruby-core:85292] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).