unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "İsmail Dönmez" <ismail@namtrac.org>
To: "emacs- devel" <emacs-devel@gnu.org>
Subject: [Resend] [PATCH] Make url-basic-auth support non-ascii passwords
Date: Mon, 20 Oct 2008 15:52:57 +0300	[thread overview]
Message-ID: <19e566510810200552r5efd8bcewa3f9cfe9740f75ee@mail.gmail.com> (raw)
In-Reply-To: <19e566510808260923t43d0b222l2a5e5b0500396d5@mail.gmail.com>

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

Resending after nearly 2 months... Please someone review and apply this.

Thanks,
ismail


---------- Forwarded message ----------
From: İsmail Dönmez <ismail@namtrac.org>
Date: Tue, Aug 26, 2008 at 19:23
Subject: [PATCH] Make url-basic-auth support non-ascii passwords
To: emacs- devel <emacs-devel@gnu.org>


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

  parent reply	other threads:[~2008-10-20 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 16:23 [PATCH] Make url-basic-auth support non-ascii passwords İsmail Dönmez
2008-08-29  6:55 ` İsmail Dönmez
2008-08-29 19:37   ` Stefan Monnier
2008-09-20 20:02     ` İsmail Dönmez
2008-09-30 16:43       ` İsmail Dönmez
2008-10-20 12:52 ` İsmail Dönmez [this message]
2008-10-20 16:06   ` [Resend] " Chong Yidong

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=19e566510810200552r5efd8bcewa3f9cfe9740f75ee@mail.gmail.com \
    --to=ismail@namtrac.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).