unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: mgcyung <mgcyung@gmail.com>
Cc: 37758@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <87ftjuqzip.fsf@gnus.org> (raw)
In-Reply-To: <875zkqd8ol.wl-mgcyung@gmail.com> (mgcyung@gmail.com's message of "Tue, 15 Oct 2019 10:49:46 +0800")

mgcyung <mgcyung@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





  reply	other threads:[~2019-10-15  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  2:49 bug#37758: 27.0.50; Support multibyte characters in function 'auth-source--pad'an; with patch mgcyung
2019-10-15  6:43 ` Lars Ingebrigtsen [this message]
2019-10-15 10:58   ` mgcyung
2019-10-16  1:32     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftjuqzip.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37758@debbugs.gnu.org \
    --cc=mgcyung@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).