Bug#982625: fails to authenticate with "TypeError: sequence item 2: expected str instance, bytes found" error

2021-02-12 Thread Sudip Mukherjee
On Fri, Feb 12, 2021 at 5:19 PM Stefano Zacchiroli  wrote:
>
> Hi Sudip, thanks for your reply,
>
> On Fri, Feb 12, 2021 at 05:00:04PM +, Sudip Mukherjee wrote:
> > Thanks for the report. Can you please paste your offlineimaprc file
> > after removing any sensitive information, and I can try to reproduce
> > the error in my setup.
>
> in fact, it turns out this is a duplicate of #981063, which I failed to
> identify initially because it didn't have the actual final error in the
> message. The workaround in that bug report worked for me.

Thanks for confirming, I was expecting that.

>
> I've tried to merge the bugs, but it failed with an error on locking a
> spool file on the BTS server. (I've just tried again.)
>
> FWIW, I think #981063 should be severity serious and fixed in time for
> bullseye.

Yes, I have raised a PR to upstream with a proper fix and will wait
till Monday before uploading here.
https://github.com/OfflineIMAP/offlineimap3/pull/51


-- 
Regards
Sudip



Bug#982625: fails to authenticate with "TypeError: sequence item 2: expected str instance, bytes found" error

2021-02-12 Thread Stefano Zacchiroli
Hi Sudip, thanks for your reply,

On Fri, Feb 12, 2021 at 05:00:04PM +, Sudip Mukherjee wrote:
> Thanks for the report. Can you please paste your offlineimaprc file
> after removing any sensitive information, and I can try to reproduce
> the error in my setup.

in fact, it turns out this is a duplicate of #981063, which I failed to
identify initially because it didn't have the actual final error in the
message. The workaround in that bug report worked for me.

I've tried to merge the bugs, but it failed with an error on locking a
spool file on the BTS server. (I've just tried again.)

FWIW, I think #981063 should be severity serious and fixed in time for
bullseye.

Cheers
-- 
Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »



Bug#982625: fails to authenticate with "TypeError: sequence item 2: expected str instance, bytes found" error

2021-02-12 Thread Sudip Mukherjee
Hi Stefano,

On Fri, Feb 12, 2021 at 3:30 PM Stefano Zacchiroli  wrote:
>
> Package: offlineimap
> Version: 7.3.3+dfsg1-1+0.0~git20210105.00d395b+dfsg-2
> Severity: serious
>
> In Debian testing offlineimap plain authentication over SSL started to fail 
> for
> me in the following way:

Thanks for the report. Can you please paste your offlineimaprc file
after removing any sensitive information, and I can try to reproduce
the error in my setup.


-- 
Regards
Sudip



Bug#982625: fails to authenticate with "TypeError: sequence item 2: expected str instance, bytes found" error

2021-02-12 Thread Stefano Zacchiroli
Package: offlineimap
Version: 7.3.3+dfsg1-1+0.0~git20210105.00d395b+dfsg-2
Severity: serious

In Debian testing offlineimap plain authentication over SSL started to fail for
me in the following way:

$ offlineimap -c ~/.config/offlineimap/offlineimaprc -u basic --info
OfflineIMAP 7.3.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL 
exception)
imaplib2 v3.05, Python v3.9.1+, OpenSSL 1.1.1i  8 Dec 2020
  imaplib2: 3.05
Remote repository 'Censored: type 'IMAP'
Host: mail.example.org Port: None SSL: True
Establishing connection to mail.example.org:993 (Censored)
Traceback (most recent call last):
  File "/usr/bin/offlineimap", line 22, in 
oi.run()
  File "/usr/share/offlineimap3/offlineimap/init.py", line 88, in run
self.__serverdiagnostics(options)
  File "/usr/share/offlineimap3/offlineimap/init.py", line 518, in 
__serverdiagnostics
account.serverdiagnostics()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 197, in 
serverdiagnostics
self.ui.serverdiagnostics(remote_repo, 'Remote')
  File "/usr/share/offlineimap3/offlineimap/ui/UIBase.py", line 450, in 
serverdiagnostics
conn = repository.imapserver.acquireconnection()
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 592, in 
acquireconnection
self.__authn_helper(imapobj)
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 449, in 
__authn_helper
if func(imapobj):
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 375, in 
__authn_plain
imapobj.authenticate('PLAIN', self.__plainhandler)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 691, in 
authenticate
typ, dat = self._simple_command('AUTHENTICATE', mechanism.upper())
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1684, in 
_simple_command
return self._command_complete(self._command(name, *args), kw)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1404, in _command
literal = literator(data, rqb)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 2247, in process
ret = self.mech(self.decode(data))
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 217, in 
__plainhandler
retval = NULL.join((authz, authc, passwd))
TypeError: sequence item 2: expected str instance, bytes found

The server in question has a valid letsencrypt certificate, which I can use and
authenticate fine with other clients.

Not sure if the problem is actually in offlineimap or in imaplib2, but no
relevant bugs seems to be reported against the latter either.

Thanks for maintaining offlineimap,
Cheers

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-3-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages offlineimap depends on:
ii  offlineimap3  0.0~git20210105.00d395b+dfsg-2

offlineimap recommends no packages.

offlineimap suggests no packages.

-- no debconf information