From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Magnus Henoch Newsgroups: gmane.emacs.bugs Subject: bug#868: [PATCH] Make url-basic-auth support non-ascii passwords Date: Tue, 02 Sep 2008 22:52:14 +0200 Message-ID: <8763pe2rup.fsf@freemail.hu> Reply-To: Magnus Henoch , 868@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1220389737 16870 80.91.229.12 (2 Sep 2008 21:08:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Sep 2008 21:08:57 +0000 (UTC) To: Emacs bug submit Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 02 23:09:51 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kad7J-00082a-E7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Sep 2008 23:08:49 +0200 Original-Received: from localhost ([127.0.0.1]:41872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kad6K-0007fG-9J for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Sep 2008 17:07:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kad6F-0007cT-2Z for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 17:07:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kad6C-0007aB-Nx for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 17:07:41 -0400 Original-Received: from [199.232.76.173] (port=53281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kad6C-0007a8-JI for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 17:07:40 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57188) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kad6C-0008JH-DV for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 17:07:40 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82L7UtR031477; Tue, 2 Sep 2008 14:07:30 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m82L03Px027762; Tue, 2 Sep 2008 14:00:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Magnus Henoch Resent-To: bug-submit-list@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: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122038874025712 (code B ref -1); Tue, 02 Sep 2008 21:00:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 20:52:20 +0000 Original-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 Original-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) Original-Received: by zemdatav.stor.no-ip.org (Postfix, from userid 1000) id 2500846894; Tue, 2 Sep 2008 22:52:15 +0200 (CEST) Mail-Copies-To: never Jabber-Id: legoscia@jabber.cd.chalmers.se X-Hashcash: 1:23:080902:submit@emacsbugs.donarmstrong.com::dHn+hJK197yaOMs6:0000000000000000000000000001DQB0 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 02 Sep 2008 17:07:41 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20040 Archived-At: --=-=-= 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))) --===-=-=-- --=-=-=--