On 21.11.2018 at 00:01, Stanislav Malyshev wrote:

>> actually the PHP wrapper should not have allowed to pass the mailbox
>> name verbatim, which would only be reasonable in my opinion, if we were
>> supporting arbitrary drivers (which we don't).  And of course, userland
> 
> PHP does not do anything with mailbox names. In fact, PHP doesn't even
> know what mailbox name is (it just passes opaque string to c-client and
> hopes c-client can make sense of it, whatever that string does). Thus,
> we support everything c-client supports, AFAIK. We could extract the
> whole parsing logic from c-client and re-implement it, but I don't think
> it's worth the time spent.

libc-client supports *arbitrary* drivers[1], but the PHP wrapper does
not[2] (presumably for good reasons[3]).  Thus, the PHP wrapper could
have expected an array (or some such) instead of a string, assembling
the mailbox name from white-listed elements.  This would have been a
much cleaner and more robust API.

Anyhow, this is water under the bridge now, and I think we should issue
a call for maintainership[4] for ext/imap as soon as possible, since
this is not the only issue[5] of this unmaintained[6] extension.

[1] see docs/drivers.txt in the imap-2007f distribution
[2]
<https://github.com/php/php-src/blob/php-7.3.0RC5/ext/imap/php_imap.c#L845-L859>
[3] see the mail_link() docs in docs/internal.txt
[4] <https://wiki.php.net/rfc/umaintained_extensions#proposal>
[5]
<https://bugs.php.net/search.php?cmd=display&package_name[]=IMAP+related&direction=DESC&limit=30&status=Open>
[6]
<https://github.com/php/php-src/blob/5a5f3617558b7a278a5c73652087b3d89927ccba/EXTENSIONS#L265>

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to