From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 5 16:00:36 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8119B16A576 for ; Mon, 5 Jun 2006 16:00:36 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06BFE43D46 for ; Mon, 5 Jun 2006 16:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k55G0Zd0037874 for ; Mon, 5 Jun 2006 16:00:35 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k55G0Z20037872; Mon, 5 Jun 2006 16:00:35 GMT (envelope-from gnats) Resent-Date: Mon, 5 Jun 2006 16:00:35 GMT Resent-Message-Id: <200606051600.k55G0Z20037872@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sergey Starosek Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53BFC16AF1C for ; Mon, 5 Jun 2006 15:55:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DE4343D46 for ; Mon, 5 Jun 2006 15:55:57 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k55Ftuui073403 for ; Mon, 5 Jun 2006 15:55:56 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k55Fttl8073401; Mon, 5 Jun 2006 15:55:55 GMT (envelope-from nobody) Message-Id: <200606051555.k55Fttl8073401@www.freebsd.org> Date: Mon, 5 Jun 2006 15:55:55 GMT From: Sergey Starosek To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/98537: p5-IMAP-Sieve fails PLAIN authentication against timsieved (cyrus-imapd) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 16:00:42 -0000 >Number: 98537 >Category: ports >Synopsis: p5-IMAP-Sieve fails PLAIN authentication against timsieved (cyrus-imapd) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 05 16:00:35 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Sergey Starosek >Release: 6.0-RELEASE >Organization: Sunbay Software Crimea Ltd. >Environment: >Description: After upgrading to cyrus-imapd to version 2.3.6, websieve-0.63.a stopped working failing to authenticate user with the following error: Jun 5 18:37:06 host sieve[64799]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication Jun 5 18:37:07 host sieve[64799]: badlogin: localhost.example.com[127.0.0.1] PLAIN error base64 decoding string Websieve in this case reports the following error: System Error: IMAP::Sieve [ Login incorrect while connecting to localhost ]: NO "Authentication Error" Wrong Password! Quick search via Google gave a hint that probably base64 encoded string contains a eol marker at position 76. Patching Sieve.pm solves a problem. >How-To-Repeat: Install cyrus-imap (with SASL and PLAIN auth support) and websieve from ports. Try to login with valid user account. >Fix: Here's a patch which solves the problem by defining empty eol separator while calling encode_base64() --- Sieve.pm.orig Mon Jun 5 18:50:26 2006 +++ Sieve.pm Mon Jun 5 18:50:49 2006 @@ -178,7 +178,7 @@ } } $userpass = "$self->{'Proxy'}\x00".$self->{'Login'}."\x00".$self->{'Password'}; - $encode=encode_base64($userpass); + $encode=encode_base64($userpass, ''); $len=length($encode); print $fh "AUTHENTICATE \"PLAIN\" {$len+}\r\n"; >Release-Note: >Audit-Trail: >Unformatted: