Skip to content

Conversation

@mpscholten
Copy link
Contributor

The pStatusLine parser parses until it hits a space. When we have a mailbox like [Gmail]/Alle Nachrichten, it will not consume the full mailbox name

The pStatusLine parser parses until it hits a space. When we have a mailbox like `[Gmail]/Alle Nachrichten`, it will not consume the full mailbox name
@mpscholten
Copy link
Contributor Author

@qnikst could you take a look at this? (and if you're on this maybe also the other open PR) :)

@qnikst
Copy link
Owner

qnikst commented Jun 8, 2025

Hello! Thanks for the patch, but I expect that it would need some more love, but correct me if I'm wrong.

I was not able to get through all the RFC, but I expect that in case if mailbox has special characters like spaces it MUST be quoted, and if there is already a double quote in the protocol it has to be escaped by the \ symbol. If this is correct then the current approach is only a partial solution: it does indeed fix the case of spaces, but does not fix it for the case if there are double quotes in the mailbox.

If you already have a good system to test and check the fix can you please try that case?

@qnikst
Copy link
Owner

qnikst commented Jun 8, 2025

I'd suggest using something like:

unquote `manyTill` char '"' ... where
  unquote = asum [ char '\' >> anyChar, anyChar]

This way we will be able to consume a quoted double quote and return it from the parser and will not stop before we needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants