From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74624: 29.4.50; Gnus cannot parse some filenames(UTF8) in an attachment Date: Sun, 01 Dec 2024 10:17:33 +0200 Message-ID: <86frn76cma.fsf@gnu.org> References: <87v7w44srm.fsf@localdomain> <86ed2s7kxp.fsf@gnu.org> <875xo3q5tg.fsf@gmail.com> <87bjxvsuv5.fsf@localdomain> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74624-done@debbugs.gnu.org, visuweshm@gmail.com To: Konstantin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 01 09:18:36 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tHfA3-0007EN-4W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Dec 2024 09:18:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHf9Z-0001jB-19; Sun, 01 Dec 2024 03:18:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHf9X-0001iQ-4i for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 03:18:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHf9W-0005wE-Sy for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 03:18:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=9eUqj//lPSxTqOKk08JreWL8gh2kXGsOXD17Rc479RQ=; b=OXgm5oyh3SybYZEWL9PsLuQIfMqmr91BfBw6psh4+vlAxQUKFiUG/RPkm5XqAn2ezJgNkrIITIjQjtsyQTAnSsThpWzBtCNAPU2W/ptas411fbautleTNu5WUQIQS1UEU9bOWIGCSO/n9WTdetBfyeNGoaQH+W/LbjkvBdhY1fOgpPM49fGMafCdrVmErjbmoVG8NL5P2Osn0MJWq9EoO6GxQGJJjTPsS71Q3Qefcn66BOLFYvLBL1tGltmKF+GUJs7xZYA7aq6B64Kr5HVgdPV6oWr4DvqUN3/3IAa+I4MO/oanI0l1kgkUkZdIykILvVou84tkEG+BibMzIKzGaQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHf9W-00027Q-Nf for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 03:18:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2024 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74624 X-GNU-PR-Package: emacs Mail-Followup-To: 74624@debbugs.gnu.org, eliz@gnu.org, reich-cv@yandex.ru Original-Received: via spool by 74624-done@debbugs.gnu.org id=D74624.17330410648104 (code D ref 74624); Sun, 01 Dec 2024 08:18:02 +0000 Original-Received: (at 74624-done) by debbugs.gnu.org; 1 Dec 2024 08:17:44 +0000 Original-Received: from localhost ([127.0.0.1]:50194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHf9D-00026e-PT for submit@debbugs.gnu.org; Sun, 01 Dec 2024 03:17:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHf9B-00026M-Ma for 74624-done@debbugs.gnu.org; Sun, 01 Dec 2024 03:17:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHf96-0005qp-G6; Sun, 01 Dec 2024 03:17:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9eUqj//lPSxTqOKk08JreWL8gh2kXGsOXD17Rc479RQ=; b=YfdeLYPQms5e NEyqc3PPIizpuSnZg/9i1QraMgx/pDC5noi+zMIgLbvzp6t5kVr9ttq4IgOdFtsz1eadNr1FeCr/o 3sUA1vgPVpjfAdKdeMZbka1IqA/zkHexwGiS7huCSqqCNbLA8zDcMcL3KAOkLvF+nC/WrueUkH9Nw juiWKKiyCMWumL4x/ods5h1thLp8pdfR1sATBf2Z8JJmonlYoEkEwbSBgrADqusHzQV7YMjzl8YwZ RDRv9PQTO6dh6HvgZb8Yl/XBMUvuGvZ227x7ZJGk9aM6LV6uZM00m7bYypctIJJPpXtTIP//wNifY LMYtDHzESIpLEUuLbw7HPA==; In-Reply-To: <87bjxvsuv5.fsf@localdomain> (message from Konstantin on Sun, 01 Dec 2024 10:52:30 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296224 Archived-At: > From: Konstantin > Cc: Eli Zaretskii , 74624@debbugs.gnu.org > Date: Sun, 01 Dec 2024 10:52:30 +0300 > > > Visuwesh writes: > > > The decoding of the filename in the Content-Disposition header is done > > in mm-dissect-buffer by calling mail-header-parse-content-disposition. > > Specifically, rfc2231-parse-string. The following patch fixes the issue > > on my end: > > > > diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el > > index 33324cafb5b..632e270a922 100644 > > --- a/lisp/mail/rfc2231.el > > +++ b/lisp/mail/rfc2231.el > > @@ -193,7 +193,7 @@ rfc2231-parse-string > > (push (list attribute value encoded) cparams)) > > ;; Repetition of a part; do nothing. > > ((and elem > > - (null number)) > > + (null part)) > > ) > > ;; Concatenate continuation parts. > > (t > > > > NUMBER is the variable used during the parsing portion of the function > > in the big condition-case form above the cl-loop form which the patch > > modifies. In the header below > > > > Content-Disposition: attachment; > > filename*0*=UTF-8''%D0%9E%D0%B1%D0%B7%D0%BE%D1%80%202024%20%28%D0%BD%D0; > > filename*1*=%B0%20.docx; > > size=10 > > > > the function first parses filename*0* and here NUMBER is 0, then > > filename*1* and here NUMBER is 1. By the time it finishes parsing size, > > NUMBER is set to nil. The loop should use the value of NUMBER pushed to > > PARAMETERS as the 3rd element (referred to as `part' by the cl-loop > > form) instead of whatever value NUMBER happened to be when we parsed the > > last element. > > Thank you, > > indeed the patch fixes this bug. Thanks, installed on the emacs-30 branch, and closing the bug.