all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Make url-basic-auth support non-ascii passwords
@ 2008-08-26 16:23 İsmail Dönmez
  2008-08-29  6:55 ` İsmail Dönmez
  2008-10-20 12:52 ` [Resend] " İsmail Dönmez
  0 siblings, 2 replies; 7+ messages in thread
From: İsmail Dönmez @ 2008-08-26 16:23 UTC (permalink / raw)
  To: emacs- devel

[-- Attachment #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: 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)))

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-20 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Resend] " İsmail Dönmez
2008-10-20 16:06   ` Chong Yidong

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.