From nobody Wed Apr 03 19:12:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V8vWh2Z6Rz5FfZX; Wed, 3 Apr 2024 19:12:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V8vWh25gSz4Hg6; Wed, 3 Apr 2024 19:12:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712171536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOQ/du9RuRYKdTF3i3/+r5ZG2NoLYKiNliC3gaC1Kcc=; b=iN1mI5GfaS4xyCdQafpGHW9jwFKFcsTkyDlgLwN6J4mid4u/zpTC1e1zMfHYxBeruXE006 TgKdF19urQszNO+kz3g8rMYQ9IPAmcg+caBhxSxYil6QS/+r6cVNTGldkNZaiRABqK4t6F EUUdZfcSP8LBOBq0uFrGBr33cGhAAW/2W0SaYen+fmtUu0pAgTFOD+IZwfML03q+PhmV8S dSpyQpRVoKX1K6UPbEsk6ggwzh30UjJjm9S1A6aTTjdgqghJhW6dSmwNRHrwZjn1QxK8aK IoTCtBL7Ytc/ZtxsF6mZsNlHrgvWTuLwh0aFtg8ppafKj1tdaOwL+MbFwHHpUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712171536; a=rsa-sha256; cv=none; b=aUksbEJXdkDemjRL4LxAWqei3JTO8w3I1phrEfrR+Dci2kGKJLQ6R39BEiAZuSkVVa/OWm ZHmqaOxbddPgL4m8CqtaCwqZrmAwzhxhAUi8EpJzTR56iyCkQivfKjxdBeJx7T2u6kmDZS aSZ7Y1R0NsivHGPJ1yEaPgMtJlLw/ySjs5BT3ZwinSvtXvRKA3myodaqWNWxaqm1gHCbi2 QoJ5cNw6jksjIH3OwC87tC1zg5vteTMCeFtzWxO3T8aqgIogp6xs8PKUosZ2yEvbdik8oF qQEq9RCuQlZPUGD05ybaqQkCP40MF0GXy3DubuhDGX85OqGt8ZzRsZRkC2KYyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712171536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOQ/du9RuRYKdTF3i3/+r5ZG2NoLYKiNliC3gaC1Kcc=; b=XItNOsbfbaxTrkQPVvS0YRUxshDzuokZPypG5WBaephyiKbWA+Y1Kokug3Sfem2zgeaBvE tneE6F31Ov9M6wPqD30KBJ9bY7Eym16p4hT55gyI4V+OIoPPAVUemfmJOQaMOHDodFKtdH 4+YUSOJzi5FbJdbSwFAO8IuCK1p3Gr8M+Pep7QUDZ3GeModDvMgCapxdGR2NFY8zb5yg+9 QPa/ldJPBNRNe7NzJyyR+TfCPCkcjks1kJ3smDgXSwm/lQ6QBcntXyEpIzDLJlFGk9NDJv GkHq5XtcnQ941GzVFD10uSAykvJ+gVATEzGRRGOSYIrb2W+mzmanaaMGhXkXjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V8vWh1j1NzlWj; Wed, 3 Apr 2024 19:12:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 433JCGWf000697; Wed, 3 Apr 2024 19:12:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 433JCG18000694; Wed, 3 Apr 2024 19:12:16 GMT (envelope-from git) Date: Wed, 3 Apr 2024 19:12:16 GMT Message-Id: <202404031912.433JCG18000694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 72c3d91294c4 - stable/14 - libfetch: parse scheme://domain:/ correctly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72c3d91294c4d9c46c8185f90cba522f539d1051 Auto-Submitted: auto-generated The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=72c3d91294c4d9c46c8185f90cba522f539d1051 commit 72c3d91294c4d9c46c8185f90cba522f539d1051 Author: Ka Ho Ng AuthorDate: 2024-03-25 20:10:42 +0000 Commit: Ka Ho Ng CommitDate: 2024-04-03 19:11:58 +0000 libfetch: parse scheme://domain:/ correctly This improves URL-parsing compability with cURL, and unbreaks parsing of similar kinds of URLs after commit 8d9de5b10a24. Sponsored by: Juniper Networks, Inc. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44493 (cherry picked from commit fb860ed0c52c2c1e7792ef86718620a439663c7f) --- lib/libfetch/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 135ee8dad151..8cb3536a46c5 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -427,7 +427,7 @@ fetchParseURL(const char *URL) goto ouch; } } - if (n < 1 || n > IPPORT_MAX) + if (p != q && (n < 1 || n > IPPORT_MAX)) goto ouch; u->port = n; p = q;