From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: mgcyung Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <87eezemg13.wl-mgcyung@gmail.com> References: <875zkqd8ol.wl-mgcyung@gmail.com> <87ftjuqzip.fsf@gnus.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="188683"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: 37758@debbugs.gnu.org, mgcyung To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 15 17:16:43 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKOYz-000mu5-0u for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 17:16:41 +0200 Original-Received: from localhost ([::1]:48262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKOYx-0005um-Aa for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 11:16:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43472) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKOMm-00032Z-MV for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 11:04:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKOMl-0004N2-Bz for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 11:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKOMk-0004Mi-9E for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 11:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKOMk-0006Hv-0o for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: mgcyung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2019 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37758 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 37758-submit@debbugs.gnu.org id=B37758.157115181924144 (code B ref 37758); Tue, 15 Oct 2019 15:04:01 +0000 Original-Received: (at 37758) by debbugs.gnu.org; 15 Oct 2019 15:03:39 +0000 Original-Received: from localhost ([127.0.0.1]:44678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKOMM-0006HL-W1 for submit@debbugs.gnu.org; Tue, 15 Oct 2019 11:03:39 -0400 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:46524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKKXL-0006I3-Mn for 37758@debbugs.gnu.org; Tue, 15 Oct 2019 06:58:44 -0400 Original-Received: by mail-wr1-f45.google.com with SMTP id o18so23229649wrv.13 for <37758@debbugs.gnu.org>; Tue, 15 Oct 2019 03:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version; bh=2ccIHt1ANQxt4bbuWLkQAKjwnjORVFbqnc8FVXzsmSs=; b=OXArzpKfFXYaZMPutTFptFANd6WsmthhK2MwBHS21XJgVrYOPK0c5XvN1hv/4VtSl7 8Sa51H+lAFtUPfNrt5H94rcJXRPJvnyTSEv8pJx1469HxMksG3f91hx0KMZ9jys7C9TH 99GrY43os0QEhFWb6xElAhOuj+HOZj8hKYQPAKmxkYIak2eeZZwMFonTene3cBQCTV0z WD60EvU8uQQr4Ea6txxEPCRQWexWxD+d6uHWihpIQOIdQZEexclWgn5Vtezxr58huDQc KyFf9W8AOZxJXYvYGKi7jQb9aIJ6w2i2oWGa6/x2U1iw7vXUKbSyCLQs6mjyhgSVhEUz 2Faw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:user-agent:mime-version; bh=2ccIHt1ANQxt4bbuWLkQAKjwnjORVFbqnc8FVXzsmSs=; b=ZvsdiQBKYFr722MpA58XAszEwdJ9t5s3fbgVe+Fs4qgUCoeYG6iUrP01Vifl6tiyvT EZfCKEcT4ThiCGo/CwGc8cL58Z5Fwnl1p5wpX3PreO8yA00uQUq8mNSv+fY/MurrzaED 3LU+NuiONKAjgvvkTsF530WiLfHeiIWg7W0HKxe91DzD7ZH+vsg6qJ65zT4nwNr03eMq H2ZbiL2o+9UCG0huxdIVDWYbNgNlAZdjX9xXSkQQpTrLbM2q/ta11sfp/tEedTqpmcJE tMLPch4Sb4/dGvXsACMm/vFs/9xcf/X0r6slRfLOa50ZZx+4SfkkaKXeRWvCY7Y/heX0 arRw== X-Gm-Message-State: APjAAAUSxSkG0ymVjyw+7//8Khfb6+UeJMQTi8Muh2QdHpb0j4NgzQpH gyUc6Y6pqEB4nVMblYz9/ME= X-Google-Smtp-Source: APXvYqwa3wERAGUH9qDBGyYW1ssOphPXB8f6b6ErJjSwipTAqQlH1FESZJQAMcZRGZYu4v2pDzj8BA== X-Received: by 2002:adf:ec84:: with SMTP id z4mr30079618wrn.254.1571137117835; Tue, 15 Oct 2019 03:58:37 -0700 (PDT) Original-Received: from localhost.gmail.com (static.76.177.203.116.clients.your-server.de. [116.203.177.76]) by smtp.gmail.com with ESMTPSA id e3sm20154201wme.39.2019.10.15.03.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 03:58:36 -0700 (PDT) In-Reply-To: <87ftjuqzip.fsf@gnus.org> X-Mailman-Approved-At: Tue, 15 Oct 2019 11:03:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169383 Archived-At: Yes. It works fine. On Tue, 15 Oct 2019 14:43:58 +0800, Lars Ingebrigtsen wrote: > > mgcyung 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