php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11433 imap_search() does not send escaped double-quotes to the imap server
Submitted: 2001-06-12 09:02 UTC Modified: 2001-06-12 13:49 UTC
From: pb at wantech dot se Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.0.5 OS: Solaris 8
Private report: No CVE-ID: None
 [2001-06-12 09:02 UTC] pb at wantech dot se
When imap_search() string contains no whitespace (ex: 

imap_search($mbox, "SUBJECT \"1234\"");

), it doesn't include the double-quotes in the command to the imap server.

The search above would result in this command to the imap server (verified with a packetsniffer):

SEARCH ALL SUBJECT 1234

If you run UW's imapd, this is not a problem, however, courier-imap requires double-quotes around the searchstring. Some strings work, but strings containing special characters or only numbers will fail if they are not surrounded by double-quotes.

If you instead do the following search:

imap_search($mbox, "SUBJECT \"1234 1234\"");

it will result in:

SEARCH ALL SUBJECT "1234 1234"

/pb

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-12 13:49 UTC] sniper@php.net
Not a bug in PHP. Please report this to the c-client author.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC