GNU bug report logs - #37758
27.0.50; Support multibyte characters in function 'auth-source--pad'an; with patch

Previous Next

Package: emacs;

Reported by: mgcyung <mgcyung <at> gmail.com>

Date: Tue, 15 Oct 2019 04:36:01 UTC

Severity: normal

Tags: fixed, moreinfo

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37758 in the body.
You can then email your comments to 37758 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37758; Package emacs. (Tue, 15 Oct 2019 04:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to mgcyung <mgcyung <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 15 Oct 2019 04:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: mgcyung <mgcyung <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Support multibyte characters in function 'auth-source--pad'an;
 with patch
Date: Tue, 15 Oct 2019 10:49:46 +0800
[Message part 1 (text/plain, inline)]
'auth-source--pad' use 'length' to get byte length of a
string. However, 'length' return the number of characters which is not
the byte length with multibyte characters such as Chinese
character. This may causes an error "GnuTLS cipher
AES-256-CBC/encrypt input block length xxxx is not a multiple of the
required 16".

According to the doc of 'length'. 'length' can be replaced by
'string-bytes'. And a patch is attached.

[auth-source--pad_byte-length.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37758; Package emacs. (Tue, 15 Oct 2019 06:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 37758 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: mgcyung <mgcyung <at> gmail.com>
Cc: 37758 <at> debbugs.gnu.org
Subject: Re: bug#37758: 27.0.50; Support multibyte characters in function
 'auth-source--pad'an; with patch
Date: Tue, 15 Oct 2019 08:43:58 +0200
mgcyung <mgcyung <at> gmail.com> writes:

> 'auth-source--pad' use 'length' to get byte length of a
> string. However, 'length' return the number of characters which is not
> the byte length with multibyte characters such as Chinese
> character. This may causes an error "GnuTLS cipher
> AES-256-CBC/encrypt input block length xxxx is not a multiple of the
> required 16".
>
> According to the doc of 'length'. 'length' can be replaced by
> 'string-bytes'. And a patch is attached.

Thanks for the patch, but I don't think it's a quite safe change.
Instead the string should be made into a sequence of bytes before
padding (and converted back again afterwards) to ensure that it survives
the encryption, I think.

I've now made this change on the trunk.  Could you check that it works
for you?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 15 Oct 2019 06:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37758; Package emacs. (Tue, 15 Oct 2019 15:04:01 GMT) Full text and rfc822 format available.

Message #13 received at 37758 <at> debbugs.gnu.org (full text, mbox):

From: mgcyung <mgcyung <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 37758 <at> debbugs.gnu.org, mgcyung <mgcyung <at> gmail.com>
Subject: Re: bug#37758: 27.0.50;
 Support multibyte characters in function 'auth-source--pad'an; with patch
Date: Tue, 15 Oct 2019 18:58:32 +0800
Yes. It works fine.

On Tue, 15 Oct 2019 14:43:58 +0800,
Lars Ingebrigtsen wrote:
> 
> mgcyung <mgcyung <at> gmail.com> writes:
> 
> > 'auth-source--pad' use 'length' to get byte length of a
> > string. However, 'length' return the number of characters which is not
> > the byte length with multibyte characters such as Chinese
> > character. This may causes an error "GnuTLS cipher
> > AES-256-CBC/encrypt input block length xxxx is not a multiple of the
> > required 16".
> >
> > According to the doc of 'length'. 'length' can be replaced by
> > 'string-bytes'. And a patch is attached.
> 
> Thanks for the patch, but I don't think it's a quite safe change.
> Instead the string should be made into a sequence of bytes before
> padding (and converted back again afterwards) to ensure that it survives
> the encryption, I think.
> 
> I've now made this change on the trunk.  Could you check that it works
> for you?
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37758; Package emacs. (Wed, 16 Oct 2019 01:33:01 GMT) Full text and rfc822 format available.

Message #16 received at 37758 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: mgcyung <mgcyung <at> gmail.com>
Cc: 37758 <at> debbugs.gnu.org
Subject: Re: bug#37758: 27.0.50; Support multibyte characters in function
 'auth-source--pad'an; with patch
Date: Wed, 16 Oct 2019 03:32:02 +0200
mgcyung <mgcyung <at> gmail.com> writes:

> Yes. It works fine.

Thanks for checking; closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 16 Oct 2019 01:33:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 37758 <at> debbugs.gnu.org and mgcyung <mgcyung <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 16 Oct 2019 01:33:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Nov 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.