closeio / closeio/sync-engine

Cannot `SELECT` folders with tabs in their name `\t` on `outlook.office365.com`

Open
#964 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
30
Forks
13
Avg merge
1d 2h
Merged PRs (30d)
8

Description

It looks like Microsoft Outlook (IMAP connection to outlook.office365.com) does not adhere to the IMAP spec and returns a BAD Command Argument Error. 11 when attempting to select a folder containing the tab character (ASCII 0x09). Sync-engine is not at fault here, but maybe there is something we can do to mitigate this issue?

This is an example client<->server exchange:

...
C: A010 SELECT "INBOX/ &AAk-Example "
S: A010 BAD Command Argument Error. 11

What's interesting is that Microsoft returns the folder name with the tab character unencoded.
See a Python repr of a partial response to the LIST command:

b'* LIST (\\HasNoChildren) "/" "INBOX/ \tExample "\r\n'

Yet sending the tab unencoded in the SELECT command also results in BAD Command Argument Error. 11.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented LIST and SELECT exchange against outlook.office365.com and inspect the IMAP folder-name handling in sync-engine. Determine whether a mitigation is possible for tab-containing folders without violating the protocol, then add coverage for the case if the relevant test area can be identified. Done means the failure is either mitigated or clearly shown to be unworkable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.