From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sean Allred <allred.sean@gmail.com>
Cc: 26708@debbugs.gnu.org
Subject: bug#26708: 25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt
Date: Wed, 15 May 2019 07:36:19 +0200 [thread overview]
Message-ID: <8736lgwa7g.fsf@mouse.gnus.org> (raw)
In-Reply-To: <CABceR4ZkkKn8QrGe5H6t=j_c=9NKyMZJjDMv0X6YbpLjaLDCdQ@mail.gmail.com> (Sean Allred's message of "Sat, 29 Apr 2017 13:16:20 +0000")
Sean Allred <allred.sean@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
prev parent reply other threads:[~2019-05-15 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 13:16 bug#26708: 25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt Sean Allred
2019-05-15 5:36 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736lgwa7g.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=26708@debbugs.gnu.org \
--cc=allred.sean@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.