unofficial mirror of emacs-devel@gnu.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

* Re: [PATCH] Make url-basic-auth support non-ascii passwords
  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-10-20 12:52 ` [Resend] " İsmail Dönmez
  1 sibling, 1 reply; 7+ messages in thread
From: İsmail Dönmez @ 2008-08-29  6:55 UTC (permalink / raw)
  To: emacs- devel

Hi again,

On Tue, Aug 26, 2008 at 19:23, İsmail Dönmez <ismail@namtrac.org> wrote:
> 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.

Could someone comment on this please? It fixes twit.el authentication
problem for me.

Regards,
ismail

-- 
Programmer Excuse #16: Its a Microsoft bug.

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

* Re: [PATCH] Make url-basic-auth support non-ascii passwords
  2008-08-29  6:55 ` İsmail Dönmez
@ 2008-08-29 19:37   ` Stefan Monnier
  2008-09-20 20:02     ` İsmail Dönmez
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2008-08-29 19:37 UTC (permalink / raw)
  To: İsmail Dönmez; +Cc: emacs- devel

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

> Could someone comment on this please? It fixes twit.el authentication
> problem for me.

It sounds right, but I still haven't had time to get to this part of my
backlog,


        Stefan




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

* Re: [PATCH] Make url-basic-auth support non-ascii passwords
  2008-08-29 19:37   ` Stefan Monnier
@ 2008-09-20 20:02     ` İsmail Dönmez
  2008-09-30 16:43       ` İsmail Dönmez
  0 siblings, 1 reply; 7+ messages in thread
From: İsmail Dönmez @ 2008-09-20 20:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs- devel

On Fri, Aug 29, 2008 at 22:37, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> 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.
>
>> Could someone comment on this please? It fixes twit.el authentication
>> problem for me.
>
> It sounds right, but I still haven't had time to get to this part of my
> backlog,

Ping please?




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

* Re: [PATCH] Make url-basic-auth support non-ascii passwords
  2008-09-20 20:02     ` İsmail Dönmez
@ 2008-09-30 16:43       ` İsmail Dönmez
  0 siblings, 0 replies; 7+ messages in thread
From: İsmail Dönmez @ 2008-09-30 16:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs- devel

On Sat, Sep 20, 2008 at 23:02, İsmail Dönmez <ismail@namtrac.org> wrote:
> On Fri, Aug 29, 2008 at 22:37, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>>> 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.
>>
>>> Could someone comment on this please? It fixes twit.el authentication
>>> problem for me.
>>
>> It sounds right, but I still haven't had time to get to this part of my
>> backlog,
>
> Ping please?

Do we have to play ping-pong to get a simple fix installed? :) Hope not.

Regards,
ismail

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

* [Resend] [PATCH] Make url-basic-auth support non-ascii passwords
  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-10-20 12:52 ` İsmail Dönmez
  2008-10-20 16:06   ` Chong Yidong
  1 sibling, 1 reply; 7+ messages in thread
From: İsmail Dönmez @ 2008-10-20 12:52 UTC (permalink / raw)
  To: emacs- devel

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

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

* Re: [Resend] [PATCH] Make url-basic-auth support non-ascii passwords
  2008-10-20 12:52 ` [Resend] " İsmail Dönmez
@ 2008-10-20 16:06   ` Chong Yidong
  0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2008-10-20 16:06 UTC (permalink / raw)
  To: İsmail Dönmez; +Cc: emacs- devel

"İsmail Dönmez" <ismail@namtrac.org> writes:

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

Applied, thanks.


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




^ permalink raw reply	[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 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).