[imp] Imp issuing improper "SORT" command at login?

James Noyes jnoyes-horde at retrogeeks.com
Mon Feb 25 15:56:30 UTC 2019


On 2/25/19, 08:05, James Noyes wrote:
> It just takes four lines (not counting updating the comments to reflect
> the change in interpretation):
>
And just in case you want my version of the updated comments:

*** Socket.php       2019-02-24 19:22:20.790613840 -0700
--- Socket.php.fix   2019-02-25 08:37:34.797941994 -0700
***************
*** 2402,2411 ****
               $cmd->add($tmp);

               /* Charset is mandatory for SORT (RFC 5256 [3]).
!              * However, if UTF-8 support is activated, a client MUST NOT
!              * send the charset specification (RFC 6855 [3]; Errata 
4029). */
               if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add($charset);
               }
           } else {
               $cmd = $this->_command(
--- 2402,2413 ----
               $cmd->add($tmp);

               /* Charset is mandatory for SORT (RFC 5256 [3]).
!              * However, if UTF-8 support is activated, this value MUST
!              * be set to 'UTF-8' (RFC 6855 [3]; Errata 4029). */
               if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add($charset);
+             } else {
+                 $cmd->add('UTF-8');
               }
           } else {
               $cmd = $this->_command(
***************
*** 2451,2458 ****
               }

               /* Charset is optional for SEARCH (RFC 3501 [6.4.4]).
!              * If UTF-8 support is activated, a client MUST NOT
!              * send the charset specification (RFC 6855 [3]; Errata 
4029). */
               if (($charset != 'US-ASCII') &&
                   !$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add(array(
--- 2453,2460 ----
               }

               /* Charset is optional for SEARCH (RFC 3501 [6.4.4]).
!              * If UTF-8 support is activated, a client MUST NOT send the
!              * optional charset specification (RFC 6855 [3]; Errata 
4029). */
               if (($charset != 'US-ASCII') &&
                   !$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add(array(
***************
*** 2750,2760 ****
               empty($options['sequence']) ? 'UID THREAD' : 'THREAD'
           )->add($tsort);

!         /* If UTF-8 support is activated, a client MUST NOT
!          * send the charset specification (RFC 6855 [3]; Errata 4029). */
           if (empty($options['search'])) {
               if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add('US-ASCII');
               }
               $cmd->add('ALL');
           } else {
--- 2752,2764 ----
               empty($options['sequence']) ? 'UID THREAD' : 'THREAD'
           )->add($tsort);

!         /* If UTF-8 support is activated, the charset specification
!          * MUST be set to 'UTF-8' (RFC 6855 [3]; Errata 4029). */
           if (empty($options['search'])) {
               if (!$this->_capability()->isEnabled('UTF8=ACCEPT')) {
                   $cmd->add('US-ASCII');
+             } else {
+                 $cmd->add('UTF-8');
               }
               $cmd->add('ALL');
           } else {


More information about the imp mailing list