From unknown Sat Sep 06 11:13:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26708 <26708@debbugs.gnu.org> To: bug#26708 <26708@debbugs.gnu.org> Subject: Status: 25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt Reply-To: bug#26708 <26708@debbugs.gnu.org> Date: Sat, 06 Sep 2025 18:13:02 +0000 retitle 26708 25.1; url-basic-auth passes wrong argument type to url-auth-u= ser-prompt reassign 26708 emacs submitter 26708 Sean Allred severity 26708 normal tag 26708 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 12:54:21 2017 Received: (at submit) by debbugs.gnu.org; 29 Apr 2017 16:54:21 +0000 Received: from localhost ([127.0.0.1]:46526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4VdU-000709-Oj for submit@debbugs.gnu.org; Sat, 29 Apr 2017 12:54:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4SEr-0001oP-VP for submit@debbugs.gnu.org; Sat, 29 Apr 2017 09:16:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4SEl-0003Lx-Gb for submit@debbugs.gnu.org; Sat, 29 Apr 2017 09:16:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d4SEl-0003Lq-DB for submit@debbugs.gnu.org; Sat, 29 Apr 2017 09:16:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4SEk-0006d1-1P for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2017 09:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4SEi-0003L7-S6 for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2017 09:16:34 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:36553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4SEi-0003Ks-L0 for bug-gnu-emacs@gnu.org; Sat, 29 Apr 2017 09:16:32 -0400 Received: by mail-wm0-x229.google.com with SMTP id u65so61083038wmu.1 for ; Sat, 29 Apr 2017 06:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+bfRkoSDRUVnnxu7lZlBIOQ5DQ5fgDj1UdIaYV4+S9U=; b=MDL1dNv4xuyPDdCGtwvdZuS4YE2RvpTMt+opV0dhgPK3SXgYs4k8bOJDK6Y+Mq6It1 +4ojZLgpgvc7zpP6v0hNuTIGqOceS02ZZGA6gXu50uq5WjisnvpFjqcXpSpL+WES59OJ 2WxLtgNfPeFmu00XQI9z9b3SzQsse65+CfFJPJ1ncfeJ9M0z5I+bck196W0Y35JjQkTT cO/7tcfJhxuOcc2QKNuxz4Rk6EQzl6OFKAJtrhvzyQuWlcfEshGWg/jc5NrnLv3BFrj5 IqMkSia2xabYAPr1sKTR4tIWUslIBJftmmmIDvjO0jik/qzRXVB0EJYIJL9vd50RnLQt Fvtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+bfRkoSDRUVnnxu7lZlBIOQ5DQ5fgDj1UdIaYV4+S9U=; b=ssyduWi5X/PGcDHIi/5ejApxUp9TBFC94EWDgrxrsunqBK6yw6co6QuYWcVSaLLIUp z3IWwIG+TrDtNZQEpAEWMDZEPgbE10nRDLuxXbIN7BklfPOvxkiI+oPq81/tdpf/yQ0c Vp+qwcyV/8hvADYh4zGDHrQKcxkgMRNT7tj935A9QEUIGNjA5gpSzxptKQUgELPuMRuT OmktOgZPxEUQQmXjHDQaHVOw0aHWd293KimaHw9WVk8ng0+5ZlAetbuAQq8lxCDtRM3f Yfcpyf3g21iMBHJXxgGBIm+Zls/tkAcEgoYRz7QzqD3uE75oMGfxxvXoWabYEFv8JMBh g6eA== X-Gm-Message-State: AN3rC/6ErQRbILkeM4RUoEHB3CCdDTbyOu8Fv5WuQgdhLauiVzb9X+zu ktqVKQBzQRXa6SWQb2PWlj8Q8zyUJw== X-Received: by 10.80.171.134 with SMTP id u6mr13201158edc.79.1493471791206; Sat, 29 Apr 2017 06:16:31 -0700 (PDT) MIME-Version: 1.0 From: Sean Allred Date: Sat, 29 Apr 2017 13:16:20 +0000 Message-ID: Subject: 25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=94eb2c19624898d594054e4dffc9 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 29 Apr 2017 12:54:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c19624898d594054e4dffc9 Content-Type: text/plain; charset=UTF-8 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]] --94eb2c19624898d594054e4dffc9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Just a small typo, it seems.=C2=A0 In `url-auth.el= 9; at

=C2=A0 =C2=A0 (setq user (or
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-do-auth-source= -search server type :user)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (read-string (url-auth-user-prompt url realm) =C2=A0 ; &l= t;-- here
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or user (user-real-login-= name))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pass (or
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-do-auth-source= -search server type :secret)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (read-passwd "Password: " nil (or pass "= ;"))))

`url` should be `href`.

=
This will prevent a type-mismatch when calling `url-basic-auth` = as

=C2=A0 =C2=A0 (url-basic-auth "http://my.api.com" t)

= The workaround for this bug is calling it as

=C2= =A0 =C2=A0=C2=A0(url-basic-auth (url-generic-parse-url "http://my.api.com") t)

Th= is function should be inspected for other such bugs, but this is the
<= div>only one I've come across personally.

-Sea= n



In GNU Emacs 25.1.= 1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F19= 11))
=C2=A0of 2016-09-20 built on builder10-9.porkrind.org
Windowing system distri= butor 'Apple', version 10.3.1504
Configured using:
<= div>=C2=A0'configure --with-ns '--enable-locallisppath=3D/Library/A= pplication
=C2=A0Support/Emacs/${version}/site-lisp:/Library/Appl= ication
=C2=A0Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIB= XML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Important= settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 lo= cale-coding-system: utf-8-unix

[[cruft/pii removed= ]]
--94eb2c19624898d594054e4dffc9-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 01:36:30 2019 Received: (at 26708) by debbugs.gnu.org; 15 May 2019 05:36:30 +0000 Received: from localhost ([127.0.0.1]:50763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQmac-0003gx-Hi for submit@debbugs.gnu.org; Wed, 15 May 2019 01:36:30 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:37262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQmaa-0003gp-Qe for 26708@debbugs.gnu.org; Wed, 15 May 2019 01:36:29 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1hQmaW-0004eO-Tf; Wed, 15 May 2019 07:36:27 +0200 From: Lars Ingebrigtsen To: Sean Allred Subject: Re: bug#26708: 25.1; url-basic-auth passes wrong argument type to url-auth-user-prompt References: Date: Wed, 15 May 2019 07:36:19 +0200 In-Reply-To: (Sean Allred's message of "Sat, 29 Apr 2017 13:16:20 +0000") Message-ID: <8736lgwa7g.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26708 Cc: 26708@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sean Allred 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 From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 01:36:40 2019 Received: (at control) by debbugs.gnu.org; 15 May 2019 05:36:40 +0000 Received: from localhost ([127.0.0.1]:50766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQmal-0003hK-QH for submit@debbugs.gnu.org; Wed, 15 May 2019 01:36:40 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:37269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQmaj-0003hA-PF for control@debbugs.gnu.org; Wed, 15 May 2019 01:36:38 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1hQmah-0008Bs-BJ for control@debbugs.gnu.org; Wed, 15 May 2019 07:36:37 +0200 Date: Wed, 15 May 2019 07:36:30 +0200 Message-Id: <871s10wa75.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #26708 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 26708 fixed close 26708 From unknown Sat Sep 06 11:13:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 12 Jun 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator