* [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL]
@ 2007-08-05 3:06 Richard Stallman
0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2007-08-05 3:06 UTC (permalink / raw)
To: emacs-devel
Does anyone see anything wrong with this patch?
------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS,
UNPARSEABLE_RELAY autolearn=failed version=3.1.0
To: emacs-devel@gnu.org
From: Edward O'Connor <hober0@gmail.com>
Date: Fri, 03 Aug 2007 23:30:22 -0400
Organization: Church of Emacs
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Jabber-ID: hober0@gmail.com
Subject: url-basic-auth -- default user/password prompt to values from URL
- --=-=-=
Hi all,
I've been hacking a bit on some code that uses url.el to talk to a
website which uses HTTP Basic authentication. I'm specifying the
username/password combination in the URL itself, and yet
`url-basic-auth' prompts me for my username and password.
Fixing that looks potentially complicated, so I thought an incremental
improvement would be for the prompts to pre-populate with the URL's
username/password combo. A patch is attached that does just that. It
would be great if this made it in before 22.2.
Here's a ChangeLog entry:
2007-08-04 Edward O'Connor <hober0@gmail.com>
* url/url-auth.el (url-basic-auth): When prompting for username
and password, default to the username and password in the URL.
- --=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=url-auth.el-default-prompt.patch
Content-Description: default user/password prompt to values from URL
cvs diff: Diffing .
Index: url-auth.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
retrieving revision 1.14
diff -u -r1.14 url-auth.el
- --- url-auth.el 26 Jul 2007 05:27:36 -0000 1.14
+++ url-auth.el 4 Aug 2007 03:18:35 -0000
@@ -68,7 +68,9 @@
(server (url-host href))
(port (url-port href))
(path (url-filename href))
- - user pass byserv retval data)
+ (user (url-user href))
+ (pass (url-password href))
+ byserv retval data)
(setq server (format "%s:%d" server port)
path (cond
(realm realm)
@@ -79,8 +81,8 @@
(cond
((and prompt (not byserv))
(setq user (read-string (url-auth-user-prompt url realm)
- - (user-real-login-name))
- - pass (read-passwd "Password: "))
+ (or user (user-real-login-name)))
+ pass (read-passwd "Password: " nil (or pass "")))
(set url-basic-auth-storage
(cons (list server
(cons path
- --=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
- --=-=-=--
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 4+ messages in thread
* [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL]
@ 2007-08-09 0:07 Richard Stallman
2007-08-09 1:46 ` Vinicius Jose Latorre
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-08-09 0:07 UTC (permalink / raw)
To: emacs-devel
Would someone please install this patch, then ack?
------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS,
UNPARSEABLE_RELAY autolearn=failed version=3.1.0
To: emacs-devel@gnu.org
From: Edward O'Connor <hober0@gmail.com>
Date: Fri, 03 Aug 2007 23:30:22 -0400
Organization: Church of Emacs
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Jabber-ID: hober0@gmail.com
Subject: url-basic-auth -- default user/password prompt to values from URL
- --=-=-=
Hi all,
I've been hacking a bit on some code that uses url.el to talk to a
website which uses HTTP Basic authentication. I'm specifying the
username/password combination in the URL itself, and yet
`url-basic-auth' prompts me for my username and password.
Fixing that looks potentially complicated, so I thought an incremental
improvement would be for the prompts to pre-populate with the URL's
username/password combo. A patch is attached that does just that. It
would be great if this made it in before 22.2.
Here's a ChangeLog entry:
2007-08-04 Edward O'Connor <hober0@gmail.com>
* url/url-auth.el (url-basic-auth): When prompting for username
and password, default to the username and password in the URL.
- --=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=url-auth.el-default-prompt.patch
Content-Description: default user/password prompt to values from URL
cvs diff: Diffing .
Index: url-auth.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
retrieving revision 1.14
diff -u -r1.14 url-auth.el
- --- url-auth.el 26 Jul 2007 05:27:36 -0000 1.14
+++ url-auth.el 4 Aug 2007 03:18:35 -0000
@@ -68,7 +68,9 @@
(server (url-host href))
(port (url-port href))
(path (url-filename href))
- - user pass byserv retval data)
+ (user (url-user href))
+ (pass (url-password href))
+ byserv retval data)
(setq server (format "%s:%d" server port)
path (cond
(realm realm)
@@ -79,8 +81,8 @@
(cond
((and prompt (not byserv))
(setq user (read-string (url-auth-user-prompt url realm)
- - (user-real-login-name))
- - pass (read-passwd "Password: "))
+ (or user (user-real-login-name)))
+ pass (read-passwd "Password: " nil (or pass "")))
(set url-basic-auth-storage
(cons (list server
(cons path
- --=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
- --=-=-=--
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL]
2007-08-09 0:07 [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL] Richard Stallman
@ 2007-08-09 1:46 ` Vinicius Jose Latorre
2007-08-10 1:38 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Vinicius Jose Latorre @ 2007-08-09 1:46 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Richard Stallman wrote:
> Would someone please install this patch, then ack?
>
Done in trunk and Emacs 22 branch.
> ------- Start of forwarded message -------
> X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS,
> UNPARSEABLE_RELAY autolearn=failed version=3.1.0
> To: emacs-devel@gnu.org
> From: Edward O'Connor <hober0@gmail.com>
> Date: Fri, 03 Aug 2007 23:30:22 -0400
> Organization: Church of Emacs
> Mime-Version: 1.0
> Content-Type: multipart/mixed; boundary="=-=-="
> Jabber-ID: hober0@gmail.com
> Subject: url-basic-auth -- default user/password prompt to values from URL
>
> - --=-=-=
>
> Hi all,
>
> I've been hacking a bit on some code that uses url.el to talk to a
> website which uses HTTP Basic authentication. I'm specifying the
> username/password combination in the URL itself, and yet
> `url-basic-auth' prompts me for my username and password.
>
> Fixing that looks potentially complicated, so I thought an incremental
> improvement would be for the prompts to pre-populate with the URL's
> username/password combo. A patch is attached that does just that. It
> would be great if this made it in before 22.2.
>
> Here's a ChangeLog entry:
>
> 2007-08-04 Edward O'Connor <hober0@gmail.com>
>
> * url/url-auth.el (url-basic-auth): When prompting for username
> and password, default to the username and password in the URL.
>
>
> - --=-=-=
> Content-Type: text/x-patch
> Content-Disposition: inline; filename=url-auth.el-default-prompt.patch
> Content-Description: default user/password prompt to values from URL
>
> cvs diff: Diffing .
> Index: url-auth.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
> retrieving revision 1.14
> diff -u -r1.14 url-auth.el
> - --- url-auth.el 26 Jul 2007 05:27:36 -0000 1.14
> +++ url-auth.el 4 Aug 2007 03:18:35 -0000
> @@ -68,7 +68,9 @@
> (server (url-host href))
> (port (url-port href))
> (path (url-filename href))
> - - user pass byserv retval data)
> + (user (url-user href))
> + (pass (url-password href))
> + byserv retval data)
> (setq server (format "%s:%d" server port)
> path (cond
> (realm realm)
> @@ -79,8 +81,8 @@
> (cond
> ((and prompt (not byserv))
> (setq user (read-string (url-auth-user-prompt url realm)
> - - (user-real-login-name))
> - - pass (read-passwd "Password: "))
> + (or user (user-real-login-name)))
> + pass (read-passwd "Password: " nil (or pass "")))
> (set url-basic-auth-storage
> (cons (list server
> (cons path
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL]
2007-08-09 1:46 ` Vinicius Jose Latorre
@ 2007-08-10 1:38 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2007-08-10 1:38 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: rms, emacs-devel
> Done in trunk and Emacs 22 branch.
BTW, we now have 3 `tiny change's from Edward O'Connor (plus one non-tiny
because covered by his copyright assignment for ERC). We should probably
ask him to sign an assignment for Emacs to cover his future changes.
Stefan
>> ------- Start of forwarded message -------
>> X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS,
>> UNPARSEABLE_RELAY autolearn=failed version=3.1.0
>> To: emacs-devel@gnu.org
>> From: Edward O'Connor <hober0@gmail.com>
>> Date: Fri, 03 Aug 2007 23:30:22 -0400
>> Organization: Church of Emacs
>> Mime-Version: 1.0
>> Content-Type: multipart/mixed; boundary="=-=-="
>> Jabber-ID: hober0@gmail.com
>> Subject: url-basic-auth -- default user/password prompt to values from URL
>>
>> - --=-=-=
>>
>> Hi all,
>>
>> I've been hacking a bit on some code that uses url.el to talk to a
>> website which uses HTTP Basic authentication. I'm specifying the
>> username/password combination in the URL itself, and yet
>> `url-basic-auth' prompts me for my username and password.
>>
>> Fixing that looks potentially complicated, so I thought an incremental
>> improvement would be for the prompts to pre-populate with the URL's
>> username/password combo. A patch is attached that does just that. It
>> would be great if this made it in before 22.2.
>>
>> Here's a ChangeLog entry:
>>
>> 2007-08-04 Edward O'Connor <hober0@gmail.com>
>>
>> * url/url-auth.el (url-basic-auth): When prompting for username
>> and password, default to the username and password in the URL.
>>
>>
>> - --=-=-=
>> Content-Type: text/x-patch
>> Content-Disposition: inline; filename=url-auth.el-default-prompt.patch
>> Content-Description: default user/password prompt to values from URL
>>
>> cvs diff: Diffing .
>> Index: url-auth.el
>> ===================================================================
>> RCS file: /sources/emacs/emacs/lisp/url/url-auth.el,v
>> retrieving revision 1.14
>> diff -u -r1.14 url-auth.el
>> - --- url-auth.el 26 Jul 2007 05:27:36 -0000 1.14
>> +++ url-auth.el 4 Aug 2007 03:18:35 -0000
>> @@ -68,7 +68,9 @@
>> (server (url-host href))
>> (port (url-port href))
>> (path (url-filename href))
>> - - user pass byserv retval data)
>> + (user (url-user href))
>> + (pass (url-password href))
>> + byserv retval data)
>> (setq server (format "%s:%d" server port)
>> path (cond
>> (realm realm)
>> @@ -79,8 +81,8 @@
>> (cond
>> ((and prompt (not byserv))
>> (setq user (read-string (url-auth-user-prompt url realm)
>> - - (user-real-login-name))
>> - - pass (read-passwd "Password: "))
>> + (or user (user-real-login-name)))
>> + pass (read-passwd "Password: " nil (or pass "")))
>> (set url-basic-auth-storage
>> (cons (list server
>> (cons path
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-10 1:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-09 0:07 [hober0@gmail.com: url-basic-auth -- default user/password prompt to values from URL] Richard Stallman
2007-08-09 1:46 ` Vinicius Jose Latorre
2007-08-10 1:38 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2007-08-05 3:06 Richard Stallman
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.