GNU bug report logs -
#26708
25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt
Previous Next
Reported by: Sean Allred <allred.sean <at> gmail.com>
Date: Sat, 29 Apr 2017 16:55:01 UTC
Severity: normal
Tags: fixed
Found in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26708 in the body.
You can then email your comments to 26708 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#26708
; Package
emacs
.
(Sat, 29 Apr 2017 16:55:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sean Allred <allred.sean <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 29 Apr 2017 16:55:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Just a small typo, it seems. In `url-auth.el' at
(setq user (or
(url-do-auth-source-search server type :user)
(read-string (url-auth-user-prompt url realm) ; <-- here
(or user (user-real-login-name))))
pass (or
(url-do-auth-source-search server type :secret)
(read-passwd "Password: " nil (or pass ""))))
`url` should be `href`.
This will prevent a type-mismatch when calling `url-basic-auth` as
(url-basic-auth "http://my.api.com" t)
The workaround for this bug is calling it as
(url-basic-auth (url-generic-parse-url "http://my.api.com") t)
This function should be inspected for other such bugs, but this is the
only one I've come across personally.
-Sean
In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version
10.9.5 (Build 13F1911))
of 2016-09-20 built on builder10-9.porkrind.org
Windowing system distributor 'Apple', version 10.3.1504
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'
Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
[[cruft/pii removed]]
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26708
; Package
emacs
.
(Wed, 15 May 2019 05:37:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 26708 <at> debbugs.gnu.org (full text, mbox):
Sean Allred <allred.sean <at> gmail.com> writes:
> Just a small typo, it seems. In `url-auth.el' at
>
> (setq user (or
> (url-do-auth-source-search server type :user)
> (read-string (url-auth-user-prompt url realm) ; <-- here
> (or user (user-real-login-name))))
> pass (or
> (url-do-auth-source-search server type :secret)
> (read-passwd "Password: " nil (or pass ""))))
>
> `url` should be `href`.
Man, the naming convention in that function is a mess. `url' is
possibly a string (but can also be an URL object), while `href' is the
real URL object, which is... backwards.
> This will prevent a type-mismatch when calling `url-basic-auth` as
>
> (url-basic-auth "http://my.api.com" t)
>
> The workaround for this bug is calling it as
>
> (url-basic-auth (url-generic-parse-url "http://my.api.com") t)
>
> This function should be inspected for other such bugs, but this is the
> only one I've come across personally.
There were two instances of the same confusion in that function. I've
now pushed a fix according to your suggestion to Emacs 27.
--
(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 05:37:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
26708 <at> debbugs.gnu.org and Sean Allred <allred.sean <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 15 May 2019 05:37:02 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:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.