From unknown Sun Jun 15 08:42:10 2025 X-Loop: don@donarmstrong.com Subject: bug#868: [PATCH] Make url-basic-auth support non-ascii passwords Reply-To: Magnus Henoch , 868@debbugs.gnu.org Resent-From: Magnus Henoch Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Tue, 02 Sep 2008 21:00:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 868 X-Emacs-PR-Package: emacs,url X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122038874025712 (code B ref -1); Tue, 02 Sep 2008 21:00:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_PACKAGE, IMPRONONCABLE_2,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 20:52:20 +0000 Received: from atum.ita.chalmers.se (atum.ita.chalmers.se [129.16.4.148]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82KqGDh025706 for ; Tue, 2 Sep 2008 13:52:18 -0700 Received: from zemdatav.stor.no-ip.org (remote3.student.chalmers.se [129.16.29.81]) by mail.chalmers.se (Postfix) with ESMTP id 5D1C985E1 for ; Tue, 2 Sep 2008 22:52:15 +0200 (CEST) Received: by zemdatav.stor.no-ip.org (Postfix, from userid 1000) id 2500846894; Tue, 2 Sep 2008 22:52:15 +0200 (CEST) From: Magnus Henoch To: Emacs bug submit Mail-Copies-To: never Jabber-Id: legoscia@jabber.cd.chalmers.se Disposition-Notification-To: Magnus Henoch X-Hashcash: 1:23:080902:submit@emacsbugs.donarmstrong.com::dHn+hJK197yaOMs6:0000000000000000000000000001DQB0 Date: Tue, 02 Sep 2008 22:52:14 +0200 Message-ID: <8763pe2rup.fsf@freemail.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Package: emacs,url Just making sure that this doesn't get lost. Will get to it later... --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C4=B0smail_D=C3=B6nmez?= Newsgroups: gmane.emacs.devel Subject: [PATCH] Make url-basic-auth support non-ascii passwords Date: Tue, 26 Aug 2008 19:23:56 +0300 Lines: 36 Approved: news@gmane.org Message-ID: <19e566510808260923t43d0b222l2a5e5b0500396d5@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1219767919 5828 80.91.229.12 (26 Aug 2008 16:25:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2008 16:25:19 +0000 (UTC) To: "emacs- devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 26 18:26:13 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KY1Mw-0001dm-Jh for ged-emacs-devel@m.gmane.org; Tue, 26 Aug 2008 18:26:10 +0200 Original-Received: from localhost ([127.0.0.1]:55803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY1Ly-0005yA-Go for ged-emacs-devel@m.gmane.org; Tue, 26 Aug 2008 12:25:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KY1Kp-0005PU-CM for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KY1Ko-0005Og-KU for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: from [199.232.76.173] (port=45759 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY1Ko-0005OV-FJ for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: from ik-out-1112.google.com ([66.249.90.176]:49255) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KY1Ko-0003XD-9Z for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: by ik-out-1112.google.com with SMTP id c21so1971677ika.2 for ; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) Original-Received: by 10.210.126.18 with SMTP id y18mr8647796ebc.100.1219767836543; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) Original-Received: by 10.210.136.18 with HTTP; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102988 Archived-At: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi, url-basic-auth uses base64-encode-string but the password string can contain non-ascii characters. In which case encode-coding-string should be used. Attached patch fixes the issue. Regards, ismail -- Programmer Excuse #26: I suspect it's a bus collision. --===-=-= Content-Type: text/x-diff; name=url-basic-auth-utf8.patch Content-Disposition: attachment; filename=url-basic-auth-utf8.patch diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index ce730ce..d089b18 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -93,7 +93,7 @@ instead of the filename inheritance method." (cons file (setq retval (base64-encode-string - (format "%s:%s" user pass))))) + (format "%s:%s" user (encode-coding-string pass 'utf-8)))))) (symbol-value url-basic-auth-storage)))) (byserv (setq retval (cdr-safe (assoc file byserv))) --===-=-=-- --=-=-=-- From unknown Sun Jun 15 08:42:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Magnus Henoch Subject: bug#868 closed by Glenn Morris (Re: Bug#868: Make url-basic-auth support non-ascii passwords) Message-ID: References: <8763pe2rup.fsf@freemail.hu> X-Emacs-PR-Message: they-closed 868 X-Emacs-PR-Package: emacs,url X-Emacs-PR-Keywords: patch Reply-To: 868@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1225404904-26043-1" This is a multi-part message in MIME format... ------------=_1225404904-26043-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs,url package: #868: [PATCH] Make url-basic-auth support non-ascii passwords It has been closed by Glenn Morris . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Glenn Morris by replying to this email. --=20 868: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D868 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1225404904-26043-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From rgm@gnu.org Thu Oct 30 15:07:55 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-11.4 required=4.0 tests=AWL,BAYES_00,FAKE_REPLY_C, HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 868-done) by emacsbugs.donarmstrong.com; 30 Oct 2008 22:07:56 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9UM7rMB024791 for <868-done@emacsbugs.donarmstrong.com>; Thu, 30 Oct 2008 15:07:54 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KvfdU-0003GS-IQ; Thu, 30 Oct 2008 18:05:00 -0400 From: Glenn Morris To: 868-done@debbugs.gnu.org Subject: Re: Bug#868: Make url-basic-auth support non-ascii passwords X-Spook: UNSCOM 9705 Samford Road CDMA Project Monarch sweep X-Ran: `$(*6i}$-i&I#O2II0kJX$\baQys0Rg4Ib\7BlBg{j5t$eC|>"m0S0Mx1ACi]4Jmqb)pnQ X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 30 Oct 2008 18:05:00 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This was installed: 2008-10-20 Ismail Donmez (tiny change) * url-auth.el (url-basic-auth): Encode password string. ------------=_1225404904-26043-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From mange@freemail.hu Tue Sep 2 13:52:20 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_PACKAGE, IMPRONONCABLE_2,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 20:52:20 +0000 Received: from atum.ita.chalmers.se (atum.ita.chalmers.se [129.16.4.148]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82KqGDh025706 for ; Tue, 2 Sep 2008 13:52:18 -0700 Received: from zemdatav.stor.no-ip.org (remote3.student.chalmers.se [129.16.29.81]) by mail.chalmers.se (Postfix) with ESMTP id 5D1C985E1 for ; Tue, 2 Sep 2008 22:52:15 +0200 (CEST) Received: by zemdatav.stor.no-ip.org (Postfix, from userid 1000) id 2500846894; Tue, 2 Sep 2008 22:52:15 +0200 (CEST) From: Magnus Henoch To: Emacs bug submit Subject: [PATCH] Make url-basic-auth support non-ascii passwords Mail-Copies-To: never Jabber-Id: legoscia@jabber.cd.chalmers.se Disposition-Notification-To: Magnus Henoch X-Hashcash: 1:23:080902:submit@emacsbugs.donarmstrong.com::dHn+hJK197yaOMs6:0000000000000000000000000001DQB0 Date: Tue, 02 Sep 2008 22:52:14 +0200 Message-ID: <8763pe2rup.fsf@freemail.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Package: emacs,url Just making sure that this doesn't get lost. Will get to it later... --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C4=B0smail_D=C3=B6nmez?= Newsgroups: gmane.emacs.devel Subject: [PATCH] Make url-basic-auth support non-ascii passwords Date: Tue, 26 Aug 2008 19:23:56 +0300 Lines: 36 Approved: news@gmane.org Message-ID: <19e566510808260923t43d0b222l2a5e5b0500396d5@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1219767919 5828 80.91.229.12 (26 Aug 2008 16:25:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2008 16:25:19 +0000 (UTC) To: "emacs- devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 26 18:26:13 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KY1Mw-0001dm-Jh for ged-emacs-devel@m.gmane.org; Tue, 26 Aug 2008 18:26:10 +0200 Original-Received: from localhost ([127.0.0.1]:55803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY1Ly-0005yA-Go for ged-emacs-devel@m.gmane.org; Tue, 26 Aug 2008 12:25:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KY1Kp-0005PU-CM for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KY1Ko-0005Og-KU for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: from [199.232.76.173] (port=45759 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY1Ko-0005OV-FJ for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: from ik-out-1112.google.com ([66.249.90.176]:49255) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KY1Ko-0003XD-9Z for emacs-devel@gnu.org; Tue, 26 Aug 2008 12:23:58 -0400 Original-Received: by ik-out-1112.google.com with SMTP id c21so1971677ika.2 for ; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) Original-Received: by 10.210.126.18 with SMTP id y18mr8647796ebc.100.1219767836543; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) Original-Received: by 10.210.136.18 with HTTP; Tue, 26 Aug 2008 09:23:56 -0700 (PDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102988 Archived-At: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===-=-=" --===-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi, url-basic-auth uses base64-encode-string but the password string can contain non-ascii characters. In which case encode-coding-string should be used. Attached patch fixes the issue. Regards, ismail -- Programmer Excuse #26: I suspect it's a bus collision. --===-=-= Content-Type: text/x-diff; name=url-basic-auth-utf8.patch Content-Disposition: attachment; filename=url-basic-auth-utf8.patch diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index ce730ce..d089b18 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -93,7 +93,7 @@ instead of the filename inheritance method." (cons file (setq retval (base64-encode-string - (format "%s:%s" user pass))))) + (format "%s:%s" user (encode-coding-string pass 'utf-8)))))) (symbol-value url-basic-auth-storage)))) (byserv (setq retval (cdr-safe (assoc file byserv))) --===-=-=-- --=-=-=-- ------------=_1225404904-26043-1--