From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72526: 31.0.50; [PATCH] Fix url-basic-auth secret search when passing username and/or port Date: Sat, 17 Aug 2024 23:50:51 +0300 Message-ID: <36997.3037087888$1723927967@news.gmane.org> References: <86bk1r661g.fsf@gnu.org> <86ed6n2zld.fsf@gnu.org> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8045"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72526@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 22:52:39 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sfQPe-0001zB-Vq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 22:52:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfQPP-0003QU-Ux; Sat, 17 Aug 2024 16:52:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfQPO-0003QL-Vv for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 16:52:23 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfQPO-0002Ti-NE for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 16:52:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=wBeLFz//CSmVJh7zJWuL/gpvTw2tsRkAg4t7nDaLxKo=; b=frWDmte59OeCnFG6HLH+vSOBv60IjSXBUqL9CmkQ2SbVRi5nabnu9u+s1fqV23Oh+VkN4J0OnQya5AJouLHTEXUDJDB1G8+BSaaRTstLnDi07TdoRjQVvjpKN6Q+nvhX5NAE+RAaQQpEVZP1EG85gUWacwxm1RusKdrqjrfoBNwGPnooGHSTkL8JxrTLz8+ZBWw6BhvhC/o9uEk4f3dWS2oYcX3fBD77tdxrDgk5/OTIU86V5bvEv7vTI6zb7qEHiFw4+8bXQ4/cctwQTV9gk9LNfIUKOQdmek6AlHUQWMWfURshvgxMGD2xkwgkEyuJNRR8GrNByXx1q/2B/waXlA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfQQ2-0004SM-10 for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 16:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Aug 2024 20:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72526-submit@debbugs.gnu.org id=B72526.172392793117066 (code B ref 72526); Sat, 17 Aug 2024 20:53:01 +0000 Original-Received: (at 72526) by debbugs.gnu.org; 17 Aug 2024 20:52:11 +0000 Original-Received: from localhost ([127.0.0.1]:55034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfQPC-0004RB-SR for submit@debbugs.gnu.org; Sat, 17 Aug 2024 16:52:11 -0400 Original-Received: from thaodan.de ([185.216.177.71]:53128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfQPA-0004Qy-UO for 72526@debbugs.gnu.org; Sat, 17 Aug 2024 16:52:09 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 03E03D00047; Sat, 17 Aug 2024 23:50:52 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1723927853; bh=5Kc1QmrCc76jT0j5QjJhw+soi7V2Af0gK9R0cpV9adE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ztpIC7aCo3M/M/+NpvkqVY8gKFNXbtYr4MWuk6RMFCUnwSuN0iY7YceX4U5WuZip6 lCrrCxIIS5+rzCyA2GDLltFl2zeFzOELEz179IRGYb6PMfI/YKEqyoXDIYAThYlfJM yt+DN5ngX75NDp8rYerqSHxIboT2YfwF1yIqRgRTHneXgATab42OvxGhsNuZVPvKfL 0QzT4V3K8naiLGceEuX1cshw52dklg0zI2NhVqiaOJhcIjQbUcKYEAKDfOb9V1XIMd 0azPbySyRBhBia8S4exc0aGbv0pYA0ZZ7ZB6Xt97Tbh6h5qSfpWGIC6PC8vIpzoV2t dI20e5eavXN8Nx9FfjWGZTLrW64mubkj1/8Y89H3s/f8VpLaSvd5er6q7Ec0o5WTUV 07ZleVf4huBjYIADFy8kZW+BLl1rMsGzPDuqfCbd4g1++dQSXBlFbFhOYQGqYJdNRO F9/E235Cb788e8W1wlvrghBtH/aiW3TrgXpI/BWtlMDu3qwbHI5bVOEu9/LlmgrX4u ZDSavty9tnSl7My41lhJ+6WHDba3aKJGUZhIH+Ua771qv8dx0du2Mf+hHj4UTDGOB9 kVCedzyHtSfZvvlHv9YUW7s9OD7XaWsQRQEIKC2TSbxoXx2uNU8tGfLCHR/dY1RaA/ /zOEd4qb4hBn43cMM6cVaAk4= In-Reply-To: <86ed6n2zld.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Aug 2024 13:49:50 +0300") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290282 Archived-At: Eli Zaretskii writes: >> From: Bj=C3=B6rn Bidar >> Cc: 72526@debbugs.gnu.org >> Date: Sat, 17 Aug 2024 11:41:33 +0300 >>=20 >> Eli Zaretskii writes: >>=20 >> >> Date: Fri, 16 Aug 2024 23:02:51 +0300 >> >> From: Bj=C3=B6rn Bidar via "Bug reports for GNU Emacs, >> >> the Swiss army knife of text editors" >> >>=20 >> >> Could someone please review my patch? >> > >> > Sorry, I don't see any experts around to ask to do that. >>=20 >> Maybe the maintainer of the url package? > > Whom did you have in mind? url.el says "emacs-devel", which is > basically no one and everyone. I don't know, the person that usually deals with the package? >> > Maybe if you'd posted a more detailed description of the problem and >> > its context, someone could follow your arguments and do a meaningful >> > review. E.g., it sounds from your description like the case of URLs >> > where it currently fails was not meant to be supported by this >> > library? If so, perhaps an alternative is to submit to this library >> > only URLs that it supports, like after stripping the port part? >>=20 >> The problem is that the user in url-basic-auth when handling urls like <= uri-type>://@ isn't >> forwarded to auth-source. Further it also appends to port to the >> hostname of host which means that the host is invalid since the hostname >> includes the port number. >>=20 >> >From what I read when looking at url-auth.el at line 84 it does support >> this kind of case of url as it already handles the same type of url when >> it deals with ://:@. > > So how come this code was not fixed since the day it was added to > Emacs, so long ago? I don't know I assume it was never an issue at that time? In any case amending the port to the :host key seems like a bug to me. Similarly when the user specifies the user in the url it should be passed to auth-source so it can find the credentials.