GNU bug report logs -
#35688
url-auth prompt is blank when realm is the empty string
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35688 in the body.
You can then email your comments to 35688 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#35688
; Package
emacs
.
(Sat, 11 May 2019 20:39:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 11 May 2019 20:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
When a website returns an empty string for realm, url-get-authentication
prompts:
Username [for ]:
See for example:
(url-retrieve-synchronously "https://outlook.office365.com/EWS/Exchange.asmx")
The attached patch makes the prompt contain the full URL, and applies to
all auth schemes. However, maybe each auth scheme should decide how to
handle a "" realm and to fix this particular case I should just change
url-basic-auth? I'm open to suggestions.
Anyway, I'm filing this bug because I think prompting for a username and
password while not showing the user the requested URL is a usability
problem.
Thomas
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 0746cfd96c..f644787cc6 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -478,6 +478,8 @@ url-get-authentication
if one cannot be found in the cache"
(if (not realm)
(setq realm (cdr-safe (assoc "realm" args))))
+ (if (equal realm "")
+ (setq realm nil))
(if (stringp url)
(setq url (url-generic-parse-url url)))
(if (or (null type) (eq type 'any))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#35688
; Package
emacs
.
(Wed, 15 May 2019 04:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 35688 <at> debbugs.gnu.org (full text, mbox):
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:
> See for example:
>
> (url-retrieve-synchronously "https://outlook.office365.com/EWS/Exchange.asmx")
>
> The attached patch makes the prompt contain the full URL, and applies to
> all auth schemes. However, maybe each auth scheme should decide how to
> handle a "" realm and to fix this particular case I should just change
> url-basic-auth? I'm open to suggestions.
>
> Anyway, I'm filing this bug because I think prompting for a username and
> password while not showing the user the requested URL is a usability
> problem.
I think your fix sounds sufficient, so I've applied it to Emacs 27.1 as
is.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 15 May 2019 04:16:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
35688 <at> debbugs.gnu.org and Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 15 May 2019 04:16:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 12 Jun 2019 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 318 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.