all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Magnus Henoch <mange@freemail.hu>
To: Emacs bug submit <submit@emacsbugs.donarmstrong.com>
Subject: bug#868: [PATCH] Make url-basic-auth support non-ascii passwords
Date: Tue, 02 Sep 2008 22:52:14 +0200	[thread overview]
Message-ID: <8763pe2rup.fsf@freemail.hu> (raw)

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]

Package: emacs,url

Just making sure that this doesn't get lost.  Will get to it later...


[-- Attachment #2: Type: message/rfc822, Size: 4209 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 264 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: url-basic-auth-utf8.patch --]
[-- Type: text/x-diff; name=url-basic-auth-utf8.patch, Size: 498 bytes --]

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)))

             reply	other threads:[~2008-09-02 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gc1vxxu4c3.fsf@fencepost.gnu.org>
2008-09-02 20:52 ` Magnus Henoch [this message]
2008-10-30 22:15   ` bug#868: marked as done ([PATCH] Make url-basic-auth support non-ascii passwords) Emacs bug Tracking System

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

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

  git send-email \
    --in-reply-to=8763pe2rup.fsf@freemail.hu \
    --to=mange@freemail.hu \
    --cc=868@emacsbugs.donarmstrong.com \
    --cc=submit@emacsbugs.donarmstrong.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.