|
57 | 57 | MailboxBE=XXXXXXXXXXXXX.EURXXXX.PROD.OUTLOOK.COM Service=Imap4] AUTHENTICATE |
58 | 58 | completed.\r\n" |
59 | 59 |
|
| 60 | + "Outlook.com and Microsoft 365 can send an invalid COPYUID response code": |
| 61 | + comment: | |
| 62 | + Although this is a buggy COPYUID response from the server, it's still a |
| 63 | + valid *generic* `resp-text-code`. We should always successfully parse |
| 64 | + `resp-text-code` when it begins with a valid `atom SP`, even if that means |
| 65 | + using UnparsedData or some other similar class to wrap the invalid or |
| 66 | + unparsable payload that follows. |
| 67 | + :response: "* OK [COPYUID 701 ]\r\n" |
| 68 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 69 | + name: OK |
| 70 | + data: !ruby/struct:Net::IMAP::ResponseText |
| 71 | + code: !ruby/struct:Net::IMAP::ResponseCode |
| 72 | + name: COPYUID |
| 73 | + data: !ruby/data:Net::IMAP::InvalidParseData |
| 74 | + parse_error: !ruby/exception:Net::IMAP::ResponseParseError |
| 75 | + message: unexpected token SPACE (expected ATOM or NUMBER or STAR) |
| 76 | + parser_class: !ruby/class 'Net::IMAP::ResponseParser' |
| 77 | + string: "* OK [COPYUID 701 ]\r\n" |
| 78 | + pos: 19 |
| 79 | + lex_state: :EXPR_BEG |
| 80 | + token: !ruby/struct:Net::IMAP::ResponseParser::Token |
| 81 | + symbol: :SPACE |
| 82 | + value: " " |
| 83 | + backtrace: |
| 84 | + - "lib/net/imap/response_parser/parser_utils.rb:218:in `parse_error'" |
| 85 | + - "lib/net/imap/response_parser/parser_utils.rb:127:in `combine_adjacent'" |
| 86 | + - "lib/net/imap/response_parser.rb:499:in `sequence_set'" |
| 87 | + - "lib/net/imap/response_parser.rb:2180:in `uid_set'" |
| 88 | + - "lib/net/imap/response_parser.rb:2034:in `resp_code_copy__data'" |
| 89 | + - "lib/net/imap/response_parser.rb:1973:in `resp_text_code'" |
| 90 | + - "lib/net/imap/response_parser.rb:1894:in `resp_text'" |
| 91 | + - "lib/net/imap/response_parser.rb:820:in `resp_cond_state'" |
| 92 | + - "lib/net/imap/response_parser.rb:824:in `resp_cond_state__untagged'" |
| 93 | + - "lib/net/imap/response_parser.rb:740:in `response_data'" |
| 94 | + - "lib/net/imap/response_parser.rb:687:in `response'" |
| 95 | + - "lib/net/imap/response_parser.rb:40:in `parse'" |
| 96 | + - "test/net/imap/net_imap_test_helpers.rb ... ignoring 3 frames" |
| 97 | + - "/gems/test-unit-3.7.3/lib/test/unit/... ignoring 42 frames" |
| 98 | + unparsed_data: '701 ' |
| 99 | + parsed_data: |
| 100 | + text: "" |
| 101 | + raw_data: "* OK [COPYUID 701 ]\r\n" |
| 102 | + |
| 103 | + "Extra resp-text-code payload": |
| 104 | + comment: | |
| 105 | + `resp-text-code` should parse when its payload continues unexpectedly. |
| 106 | + :response: "* OK [COPYUID 1 1:10 101:110 extra junk] bad\r\n" |
| 107 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 108 | + name: OK |
| 109 | + data: !ruby/struct:Net::IMAP::ResponseText |
| 110 | + code: !ruby/struct:Net::IMAP::ResponseCode |
| 111 | + name: COPYUID |
| 112 | + data: !ruby/data:Net::IMAP::InvalidParseData |
| 113 | + parse_error: !ruby/exception:Net::IMAP::ResponseParseError |
| 114 | + message: expected resp-text-code "COPYUID" to be complete |
| 115 | + backtrace: |
| 116 | + - "lib/net/imap/response_parser/parser_utils.rb:218:in 'Net::IMAP::ResponseParser::ParserUtils#parse_error'" |
| 117 | + - "lib/net/imap/response_parser.rb:1981:in 'Net::IMAP::ResponseParser#resp_text_code'" |
| 118 | + - "lib/net/imap/response_parser.rb:1894:in 'Net::IMAP::ResponseParser#resp_text'" |
| 119 | + - "lib/net/imap/response_parser.rb:820:in 'Net::IMAP::ResponseParser#resp_cond_state'" |
| 120 | + - "lib/net/imap/response_parser.rb:824:in 'Net::IMAP::ResponseParser#resp_cond_state__untagged'" |
| 121 | + - "lib/net/imap/response_parser.rb:740:in 'Net::IMAP::ResponseParser#response_data'" |
| 122 | + - "lib/net/imap/response_parser.rb:687:in 'Net::IMAP::ResponseParser#response'" |
| 123 | + - "lib/net/imap/response_parser.rb:40:in 'Net::IMAP::ResponseParser#parse'" |
| 124 | + - "test/net/imap/net_imap_test_helpers.rb ... ignoring 3 frames" |
| 125 | + - "/gems/test-unit-3.7.3/lib/test/unit/... ignoring 42 frames" |
| 126 | + parser_class: !ruby/class 'Net::IMAP::ResponseParser' |
| 127 | + string: "* OK [COPYUID 1 1:10 101:110 extra junk] bad\r\n" |
| 128 | + pos: 29 |
| 129 | + lex_state: :EXPR_BEG |
| 130 | + token: !ruby/struct:Net::IMAP::ResponseParser::Token |
| 131 | + symbol: :SPACE |
| 132 | + value: " " |
| 133 | + unparsed_data: 1 1:10 101:110 extra junk |
| 134 | + parsed_data: !ruby/data:Net::IMAP::CopyUIDData |
| 135 | + uidvalidity: 1 |
| 136 | + source_uids: !ruby/object:Net::IMAP::SequenceSet |
| 137 | + string: '1:10' |
| 138 | + assigned_uids: !ruby/object:Net::IMAP::SequenceSet |
| 139 | + string: 101:110 |
| 140 | + text: bad |
| 141 | + raw_data: "* OK [COPYUID 1 1:10 101:110 extra junk] bad\r\n" |
| 142 | + |
| 143 | + "Missing resp-text-code payload": |
| 144 | + comment: | |
| 145 | + `resp-text-code` should parse even when its expected payload is missing. |
| 146 | + :response: "* OK [COPYUID] missing\r\n" |
| 147 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 148 | + name: OK |
| 149 | + data: !ruby/struct:Net::IMAP::ResponseText |
| 150 | + code: !ruby/struct:Net::IMAP::ResponseCode |
| 151 | + name: COPYUID |
| 152 | + data: !ruby/data:Net::IMAP::InvalidParseData |
| 153 | + parse_error: !ruby/exception:Net::IMAP::ResponseParseError |
| 154 | + message: unexpected RBRA (expected " ") |
| 155 | + backtrace: |
| 156 | + - "lib/net/imap/response_parser/parser_utils.rb:218:in 'Net::IMAP::ResponseParser::ParserUtils#parse_error'" |
| 157 | + - "lib/net/imap/response_parser/parser_utils.rb:54:in 'Net::IMAP::ResponseParser#SP!'" |
| 158 | + - "lib/net/imap/response_parser.rb:1973:in 'Net::IMAP::ResponseParser#resp_text_code'" |
| 159 | + - "lib/net/imap/response_parser.rb:1894:in 'Net::IMAP::ResponseParser#resp_text'" |
| 160 | + - "lib/net/imap/response_parser.rb:820:in 'Net::IMAP::ResponseParser#resp_cond_state'" |
| 161 | + - "lib/net/imap/response_parser.rb:824:in 'Net::IMAP::ResponseParser#resp_cond_state__untagged'" |
| 162 | + - "lib/net/imap/response_parser.rb:740:in 'Net::IMAP::ResponseParser#response_data'" |
| 163 | + - "lib/net/imap/response_parser.rb:687:in 'Net::IMAP::ResponseParser#response'" |
| 164 | + - "lib/net/imap/response_parser.rb:40:in 'Net::IMAP::ResponseParser#parse'" |
| 165 | + - "test/net/imap/net_imap_test_helpers.rb ... ignoring 3 frames" |
| 166 | + - "/gems/test-unit-3.7.3/lib/test/unit/... ignoring 42 frames" |
| 167 | + parser_class: !ruby/class 'Net::IMAP::ResponseParser' |
| 168 | + string: "* OK [COPYUID] missing\r\n" |
| 169 | + pos: 14 |
| 170 | + lex_state: :EXPR_BEG |
| 171 | + token: !ruby/struct:Net::IMAP::ResponseParser::Token |
| 172 | + symbol: :RBRA |
| 173 | + value: "]" |
| 174 | + unparsed_data: |
| 175 | + parsed_data: |
| 176 | + text: missing |
| 177 | + raw_data: "* OK [COPYUID] missing\r\n" |
| 178 | + |
| 179 | + "Unexpected resp-text-code payload": |
| 180 | + comment: | |
| 181 | + `resp-text-code` should parse even when a payload is unexpectedly present. |
| 182 | + :response: "* OK [CLOSED shouldn't be anything here] mailbox closed\r\n" |
| 183 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 184 | + name: OK |
| 185 | + data: !ruby/struct:Net::IMAP::ResponseText |
| 186 | + code: !ruby/struct:Net::IMAP::ResponseCode |
| 187 | + name: CLOSED |
| 188 | + data: !ruby/data:Net::IMAP::InvalidParseData |
| 189 | + parse_error: !ruby/exception:Net::IMAP::ResponseParseError |
| 190 | + message: expected resp-text-code "CLOSED" to be complete |
| 191 | + backtrace: |
| 192 | + - "lib/net/imap/response_parser/parser_utils.rb:218:in 'Net::IMAP::ResponseParser::ParserUtils#parse_error'" |
| 193 | + - "lib/net/imap/response_parser.rb:1981:in 'Net::IMAP::ResponseParser#resp_text_code'" |
| 194 | + - "lib/net/imap/response_parser.rb:1894:in 'Net::IMAP::ResponseParser#resp_text'" |
| 195 | + - "lib/net/imap/response_parser.rb:820:in 'Net::IMAP::ResponseParser#resp_cond_state'" |
| 196 | + - "lib/net/imap/response_parser.rb:824:in 'Net::IMAP::ResponseParser#resp_cond_state__untagged'" |
| 197 | + - "lib/net/imap/response_parser.rb:740:in 'Net::IMAP::ResponseParser#response_data'" |
| 198 | + - "lib/net/imap/response_parser.rb:687:in 'Net::IMAP::ResponseParser#response'" |
| 199 | + - "lib/net/imap/response_parser.rb:40:in 'Net::IMAP::ResponseParser#parse'" |
| 200 | + - "test/net/imap/net_imap_test_helpers.rb ... ignoring 3 frames" |
| 201 | + - "/gems/test-unit-3.7.3/lib/test/unit/... ignoring 42 frames" |
| 202 | + parser_class: !ruby/class 'Net::IMAP::ResponseParser' |
| 203 | + string: "* OK [CLOSED shouldn't be anything here] mailbox closed\r\n" |
| 204 | + pos: 13 |
| 205 | + lex_state: :EXPR_BEG |
| 206 | + token: !ruby/struct:Net::IMAP::ResponseParser::Token |
| 207 | + symbol: :SPACE |
| 208 | + value: " " |
| 209 | + unparsed_data: shouldn't be anything here |
| 210 | + parsed_data: |
| 211 | + text: mailbox closed |
| 212 | + raw_data: "* OK [CLOSED shouldn't be anything here] mailbox closed\r\n" |
| 213 | + |
60 | 214 | outlook.com puts an extra SP in ENVELOPE address lists: |
61 | 215 | comment: | |
62 | 216 | An annoying bug from outlook.com. They've had the bug for years, and |
|
0 commit comments