public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/files/
Date: Fri, 17 Feb 2023 05:14:01 +0000 (UTC)	[thread overview]
Message-ID: <1676610555.4f70beb853611a7a7100ef265ea8b53740ce92b9.sam@gentoo> (raw)

commit:     4f70beb853611a7a7100ef265ea8b53740ce92b9
Author:     Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja>
AuthorDate: Thu Feb 16 11:00:44 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 05:09:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f70beb8

net-misc/curl: remove unused files

Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja>
Closes: https://github.com/gentoo/gentoo/pull/29607
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...roxy-tailmatch-like-in-7.85.0-and-earlier.patch | 84 ---------------------
 .../curl-7.86.0-proxy-noproxy-match-comma.patch    | 86 ----------------------
 .../curl-7.86.0-proxy-noproxy-tailmatching.patch   | 66 -----------------
 3 files changed, 236 deletions(-)

diff --git a/net-misc/curl/files/curl-7.86.0-noproxy-tailmatch-like-in-7.85.0-and-earlier.patch b/net-misc/curl/files/curl-7.86.0-noproxy-tailmatch-like-in-7.85.0-and-earlier.patch
deleted file mode 100644
index 1f04f22f9b1b..000000000000
--- a/net-misc/curl/files/curl-7.86.0-noproxy-tailmatch-like-in-7.85.0-and-earlier.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-https://github.com/curl/curl/issues/9842
-https://github.com/curl/curl/commit/b1953c1933b369b1217ef0f16053e26da63488c3
-
-From b1953c1933b369b1217ef0f16053e26da63488c3 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Sun, 6 Nov 2022 23:19:51 +0100
-Subject: [PATCH] noproxy: tailmatch like in 7.85.0 and earlier
-
-A regfression in 7.86.0 (via 1e9a538e05c010) made the tailmatch work
-differently than before. This restores the logic to how it used to work:
-
-All names listed in NO_PROXY are tailmatched against the used domain
-name, if the lengths are identical it needs a full match.
-
-Update the docs, update test 1614.
-
-Reported-by: Stuart Henderson
-Fixes #9842
-Closes #9858
----
- docs/libcurl/opts/CURLOPT_NOPROXY.3 |  4 ----
- lib/noproxy.c                       | 32 +++++++++++++++--------------
- tests/unit/unit1614.c               |  3 ++-
- 3 files changed, 19 insertions(+), 20 deletions(-)
-
-diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3
-index 5e4c32130431..dc3cf7c10833 100644
---- a/docs/libcurl/opts/CURLOPT_NOPROXY.3
-+++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3
-@@ -40,10 +40,6 @@ list is matched as either a domain which contains the hostname, or the
- hostname itself. For example, "ample.com" would match ample.com, ample.com:80,
- and www.ample.com, but not www.example.com or ample.com.org.
- 
--If the name in the \fInoproxy\fP list has a leading period, it is a domain
--match against the provided host name. This way ".example.com" will switch off
--proxy use for both "www.example.com" as well as for "foo.example.com".
--
- Setting the \fInoproxy\fP string to "" (an empty string) will explicitly
- enable the proxy for all host names, even if there is an environment variable
- set for it.
-diff --git a/lib/noproxy.c b/lib/noproxy.c
-index 2832ae166a5b..fb856e4faa72 100644
---- a/lib/noproxy.c
-+++ b/lib/noproxy.c
-@@ -187,22 +187,24 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
-             tokenlen--;
- 
-           if(tokenlen && (*token == '.')) {
--            /* A: example.com matches '.example.com'
--               B: www.example.com matches '.example.com'
--               C: nonexample.com DOES NOT match '.example.com'
--            */
--            if((tokenlen - 1) == namelen)
--              /* case A, exact match without leading dot */
--              match = strncasecompare(token + 1, name, namelen);
--            else if(tokenlen < namelen)
--              /* case B, tailmatch with leading dot */
--              match = strncasecompare(token, name + (namelen - tokenlen),
--                                      tokenlen);
--            /* case C passes through, not a match */
-+            /* ignore leading token dot as well */
-+            token++;
-+            tokenlen--;
-           }
--          else
--            match = (tokenlen == namelen) &&
--              strncasecompare(token, name, namelen);
-+          /* A: example.com matches 'example.com'
-+             B: www.example.com matches 'example.com'
-+             C: nonexample.com DOES NOT match 'example.com'
-+          */
-+          if(tokenlen == namelen)
-+            /* case A, exact match */
-+            match = strncasecompare(token, name, namelen);
-+          else if(tokenlen < namelen) {
-+            /* case B, tailmatch domain */
-+            match = (name[namelen - tokenlen - 1] == '.') &&
-+              strncasecompare(token, name + (namelen - tokenlen),
-+                              tokenlen);
-+          }
-+          /* case C passes through, not a match */
-           break;
-         case TYPE_IPV4:
-           /* FALLTHROUGH */

diff --git a/net-misc/curl/files/curl-7.86.0-proxy-noproxy-match-comma.patch b/net-misc/curl/files/curl-7.86.0-proxy-noproxy-match-comma.patch
deleted file mode 100644
index 6c8f4067e8d5..000000000000
--- a/net-misc/curl/files/curl-7.86.0-proxy-noproxy-match-comma.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-https://bugs.gentoo.org/878365#c2
-https://github.com/curl/curl/issues/9813
-https://github.com/curl/curl/commit/efc286b7a62af0568fdcbf3c68791c9955182128
-
-From efc286b7a62af0568fdcbf3c68791c9955182128 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Thu, 27 Oct 2022 13:54:27 +0200
-Subject: [PATCH] noproxy: also match with adjacent comma
-
-If the host name is an IP address and the noproxy string contained that
-IP address with a following comma, it would erroneously not match.
-
-Extended test 1614 to verify this combo as well.
-
-Reported-by: Henning Schild
-
-Fixes #9813
-Closes #9814
---- a/lib/noproxy.c
-+++ b/lib/noproxy.c
-@@ -192,18 +192,22 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
-           /* FALLTHROUGH */
-         case TYPE_IPV6: {
-           const char *check = token;
--          char *slash = strchr(check, '/');
-+          char *slash;
-           unsigned int bits = 0;
-           char checkip[128];
-+          if(tokenlen >= sizeof(checkip))
-+            /* this cannot match */
-+            break;
-+          /* copy the check name to a temp buffer */
-+          memcpy(checkip, check, tokenlen);
-+          checkip[tokenlen] = 0;
-+          check = checkip;
-+
-+          slash = strchr(check, '/');
-           /* if the slash is part of this token, use it */
--          if(slash && (slash < &check[tokenlen])) {
-+          if(slash) {
-             bits = atoi(slash + 1);
--            /* copy the check name to a temp buffer */
--            if(tokenlen >= sizeof(checkip))
--              break;
--            memcpy(checkip, check, tokenlen);
--            checkip[ slash - check ] = 0;
--            check = checkip;
-+            *slash = 0; /* null terminate there */
-           }
-           if(type == TYPE_IPV6)
-             match = Curl_cidr6_match(name, check, bits);
---- a/tests/data/test1614
-+++ b/tests/data/test1614
-@@ -16,7 +16,7 @@ unittest
- proxy
- </features>
-  <name>
--cidr comparisons
-+noproxy and cidr comparisons
-  </name>
- </client>
- <errorcode>
---- a/tests/unit/unit1614.c
-+++ b/tests/unit/unit1614.c
-@@ -77,6 +77,20 @@ UNITTEST_START
-     { NULL, NULL, 0, FALSE} /* end marker */
-   };
-   struct noproxy list[]= {
-+    { "127.0.0.1", "127.0.0.1,localhost", TRUE},
-+    { "127.0.0.1", "127.0.0.1,localhost,", TRUE},
-+    { "127.0.0.1", "127.0.0.1/8,localhost,", TRUE},
-+    { "127.0.0.1", "127.0.0.1/28,localhost,", TRUE},
-+    { "127.0.0.1", "127.0.0.1/31,localhost,", TRUE},
-+    { "127.0.0.1", "localhost,127.0.0.1", TRUE},
-+    { "127.0.0.1", "localhost,127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1."
-+      "127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127."
-+      "0.0.1.127.0.0.1.127.0.0." /* 128 bytes "address" */, FALSE},
-+    { "127.0.0.1", "localhost,127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1."
-+      "127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127.0.0.1.127."
-+      "0.0.1.127.0.0.1.127.0.0" /* 127 bytes "address" */, FALSE},
-+    { "localhost", "localhost,127.0.0.1", TRUE},
-+    { "localhost", "127.0.0.1,localhost", TRUE},
-     { "foobar", "barfoo", FALSE},
-     { "foobar", "foobar", TRUE},
-     { "192.168.0.1", "foobar", FALSE},
-

diff --git a/net-misc/curl/files/curl-7.86.0-proxy-noproxy-tailmatching.patch b/net-misc/curl/files/curl-7.86.0-proxy-noproxy-tailmatching.patch
deleted file mode 100644
index 15f5e64c91f3..000000000000
--- a/net-misc/curl/files/curl-7.86.0-proxy-noproxy-tailmatching.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-https://bugs.gentoo.org/878365#c2
-https://github.com/curl/curl/issues/9821
-https://github.com/curl/curl/commit/b830f9ba9e94acf672cd191993ff679fa888838b
-
-From b830f9ba9e94acf672cd191993ff679fa888838b Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Fri, 28 Oct 2022 10:51:49 +0200
-Subject: [PATCH] noproxy: fix tail-matching
-
-Also ignore trailing dots in both host name and comparison pattern.
-
-Regression in 7.86.0 (from 1e9a538e05c0)
-
-Extended test 1614 to verify better.
-
-Reported-by: Henning Schild
-Fixes #9821
-Closes #9822
---- a/lib/noproxy.c
-+++ b/lib/noproxy.c
-@@ -153,9 +153,14 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
-     }
-     else {
-       unsigned int address;
-+      namelen = strlen(name);
-       if(1 == Curl_inet_pton(AF_INET, name, &address))
-         type = TYPE_IPV4;
--      namelen = strlen(name);
-+      else {
-+        /* ignore trailing dots in the host name */
-+        if(name[namelen - 1] == '.')
-+          namelen--;
-+      }
-     }
- 
-     while(*p) {
-@@ -177,12 +182,23 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
-       if(tokenlen) {
-         switch(type) {
-         case TYPE_HOST:
--          if(*token == '.') {
--            ++token;
--            --tokenlen;
--            /* tailmatch */
--            match = (tokenlen <= namelen) &&
--              strncasecompare(token, name + (namelen - tokenlen), namelen);
-+          /* ignore trailing dots in the token to check */
-+          if(token[tokenlen - 1] == '.')
-+            tokenlen--;
-+
-+          if(tokenlen && (*token == '.')) {
-+            /* A: example.com matches '.example.com'
-+               B: www.example.com matches '.example.com'
-+               C: nonexample.com DOES NOT match '.example.com'
-+            */
-+            if((tokenlen - 1) == namelen)
-+              /* case A, exact match without leading dot */
-+              match = strncasecompare(token + 1, name, namelen);
-+            else if(tokenlen < namelen)
-+              /* case B, tailmatch with leading dot */
-+              match = strncasecompare(token, name + (namelen - tokenlen),
-+                                      tokenlen);
-+            /* case C passes through, not a match */
-           }
-           else
-             match = (tokenlen == namelen) &&


             reply	other threads:[~2023-02-17  5:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  5:14 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-23 20:01 [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/files/ Conrad Kostecki
2024-10-04  8:27 Sam James
2023-10-15 22:04 Conrad Kostecki
2023-08-14  5:58 Conrad Kostecki
2023-06-10  9:16 Sam James
2023-03-23  8:59 Sam James
2023-02-22 10:00 Sam James
2023-01-01 18:16 Conrad Kostecki
2022-07-09 15:14 Anthony G. Basile
2021-11-17 21:24 Anthony G. Basile
2021-09-18  4:22 Sam James
2021-06-08 16:00 Anthony G. Basile
2018-07-14 19:06 Anthony G. Basile
2018-01-13 22:41 David Seifert
2017-08-09 12:18 Anthony G. Basile
2017-02-01 14:45 Anthony G. Basile

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=1676610555.4f70beb853611a7a7100ef265ea8b53740ce92b9.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox