1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Skip incorrectly formatted/parsed LSUB/LIST replies

Example: * LIST (\HasChildren) "." [Folder]
"[Folder]" will be parsed as list containing the element "Folder".
This commit is contained in:
cketti 2013-08-20 18:39:20 +02:00
parent 7a04c19798
commit f11f0fcc9b

View File

@ -566,6 +566,12 @@ public class ImapStore extends Store {
if (ImapResponseParser.equalsIgnoreCase(response.get(0), commandResponse)) {
boolean includeFolder = true;
if (response.size() > 4 || !(response.getObject(3) instanceof String)) {
Log.w(K9.LOG_TAG, "Skipping incorrectly parsed " + commandResponse +
" reply: " + response);
continue;
}
String decodedFolderName;
try {
decodedFolderName = decodeFolderName(response.getString(3));