Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in TIdIMAP4.ListMailBoxes() #329

Open
rlebeau opened this issue Nov 26, 2020 · 1 comment
Open

Bug in TIdIMAP4.ListMailBoxes() #329

rlebeau opened this issue Nov 26, 2020 · 1 comment
Labels
Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server Status: Review Needed Issue needs further review to decide next status Type: Bug Issue is a bug in existing code

Comments

@rlebeau
Copy link
Member

rlebeau commented Nov 26, 2020

When ListMailBoxes() is executed on a Lotus Notes server, lines are returned that may look like this:

* LIST (\HasNoChildren) "\\" Folder\Subfolder 1
* LIST (\HasNoChildren) "\\" Folder\Subfolder 2

In the resulting list this is stored as

[0] LIST
[1] \HasNoChildren
[2] \
[3] Folder\Subfolder
[4] 1

The IMAP server's response is valid according to the protocol.

There are two "failing" procedures: InternalParseListResult and ParseIntoBrackettedQuotedAndUnquotedParts.

Shouldn't ParseIntoBrackettedQuotedAndUnquotedParts simply regard everything after the delimiter as a Folder path?

InternalParseListResult doesn't check idx 2 as Delimiter, instead it takes the one to last entry and takes the first character of that. In the example, the delimiter would become 'F'. It also decides that the last index is the folder name, so the folder ends up as '1' or '2'. It should take the delimiter from LSlRetrieve[2] and regard LSlRetrieve[3] and higher as the folder name.

When ListMailBoxes() is executed on MS Outlook server, everything works as expected, as that returns lines like this:

* LIST (\HasNoChildren) "." "INBOX.Folder.Subfolder 1"
* LIST (\HasNoChildren) "." "INBOX.Folder.Subfolder 2"
@rlebeau rlebeau added Type: Bug Issue is a bug in existing code Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server labels Nov 26, 2020
@rlebeau
Copy link
Member Author

rlebeau commented Nov 30, 2020

Related to #175 and #112?

@rlebeau rlebeau added the Status: Review Needed Issue needs further review to decide next status label Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Element: IMAP4 Issues related to TIdIMAP4 and TIdIMAP4Server Status: Review Needed Issue needs further review to decide next status Type: Bug Issue is a bug in existing code
Projects
None yet
Development

No branches or pull requests

1 participant