Commit Graph

29336 Commits

Author SHA1 Message Date
Daniel Stenberg
3678336b20
scripts/checksrc.pl: detect duplicated include files
After an idea by Dan Fandrich in #9794

Closes #9796
2022-10-26 11:27:29 +02:00
Daniel Stenberg
6092eaa3e6
RELEASE-NOTES: synced
And bumped version to 7.86.1 for now
2022-10-26 11:23:41 +02:00
Daniel Stenberg
716ad5ea49
CURLMOPT_SOCKETFUNCTION.3: clarify CURL_POLL_REMOVE
The removal is brief or long, don't assume.

Reported-by: Luca Niccoli

Fixes #9799
Closes #9800
2022-10-26 11:23:35 +02:00
Daniel Stenberg
cd95ee9f77
RELEASE: synced
The 7.86.0 release
2022-10-26 08:12:46 +02:00
Daniel Stenberg
934ecfae17
THANKS: added from the 7.86.0 release 2022-10-26 08:12:46 +02:00
Viktor Szakats
86c0029047
noproxy: include netinet/in.h for htonl()
Solve the Amiga build warning by including `netinet/in.h`.

`krb5.c` and `socketpair.c` are using `htonl()` too. This header is
already included in those sources.

Regression from 1e9a538e05

Reviewed-by: Daniel Stenberg
Closes #9787
2022-10-25 15:20:45 +00:00
Marc Hoersken
0e6e56930f
CI: fix AppVeyor status failing for starting jobs 2022-10-24 20:50:27 +02:00
Daniel Stenberg
038bfb8522
test445: verifies the protocols-over-http-proxy flaw and fix 2022-10-24 15:30:25 +02:00
Daniel Stenberg
55e1875729
http_proxy: restore the protocol pointer on error
Reported-by: Trail of Bits

Closes #9790
2022-10-24 15:30:25 +02:00
Daniel Stenberg
9d0869d234
multi: remove duplicate include of connect.h
Reported-by: Martin Strunz
Fixes #9794
Closes #9795
2022-10-24 13:49:22 +02:00
Daniel Gustafsson
d4a4d5402f idn: fix typo in test description
s/enabked/enabled/i
2022-10-24 13:38:26 +02:00
Daniel Stenberg
53bcf55b45
url: use IDN decoded names for HSTS checks
Reported-by: Hiroki Kurosawa

Closes #9791
2022-10-24 12:00:54 +02:00
Daniel Stenberg
809c81b9f5
unit1614: fix disabled-proxy build
Follow-up to 1e9a538e05

Closes #9792
2022-10-24 11:58:03 +02:00
Daniel Gustafsson
8f384577b8 cookies: optimize control character check
When checking for invalid octets the strcspn() call will return the
position of the first found invalid char or the first NULL byte.
This means that we can check the indicated position in the search-
string saving a strlen() call.

Closes: #9736
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
2022-10-24 11:31:08 +02:00
Daniel Stenberg
c97ec984fb
netrc: replace fgets with Curl_get_line
Make the parser only accept complete lines and avoid problems with
overly long lines.

Reported-by: Hiroki Kurosawa

Closes #9789
2022-10-24 11:29:03 +02:00
Daniel Stenberg
84c6b1a02f
RELEASE-NOTES: add "Planned upcoming removals include"
URL: https://curl.se/mail/archive-2022-10/0001.html

Suggested-by: Dan Fandrich
2022-10-23 17:27:17 +02:00
Viktor Szakats
b9a8da4e6e
ci: bump to gcc-11 for macos
Ref: https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/
Ref: https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md

Reviewed-by: Max Dymond
Closes #9785
2022-10-23 12:40:26 +00:00
Viktor Szakats
a0d8a1aa91
Makefile.m32: reintroduce CROSSPREFIX and -W -Wall [ci skip]
- Reintroduce `CROSSPREFIX`:

  If set, we add it to the `CC` and `AR` values, and to the _default_
  value of `RC`, which is `windres`. This allows to control each of
  these individidually, while also allowing to simplify configuration
  via `CROSSPREFIX`.

  This variable worked differently earlier. Hopefully this new solution
  hits a better compromise in usefulness/complexity/flexibility.

  Follow-up to: aa970c4c08

- Enable warnings again:

  This time with an option to override it via `CFLAGS`. Warnings are
  also enabled by default in CMake, `makefile.dj` and `makefile.amiga`
  builds (not in autotools though).

  Follow-up to 10fbd8b4e3

Closes #9784
2022-10-22 23:21:03 +00:00
Viktor Szakats
9b63dda16e
noproxy: silence unused variable warnings with no ipv6
Follow-up to 36474f1050

Reviewed-by: Daniel Stenberg
Closes #9782
2022-10-22 23:20:26 +00:00
Daniel Stenberg
f5e5384ec3
test644: verify --xattr (with redirect) 2022-10-22 23:56:38 +02:00
Daniel Stenberg
3ab3c16b2c
tool_xattr: save the original URL, not the final redirected one
Adjusted test 1621 accordingly.

Reported-by: Viktor Szakats
Fixes #9766
Closes #9768
2022-10-22 23:56:23 +02:00
Daniel Stenberg
873cc38e89
docs: make sure libcurl opts examples pass in long arguments
Reported-by: Sergey
Fixes #9779
Closes #9780
2022-10-22 23:24:57 +02:00
Marc Hoersken
c2e9376a89
CI: fix AppVeyor job links only working for most recent build
Ref: https://github.com/curl/curl/pull/9768#issuecomment-1286675916
Reported-by: Daniel Stenberg

Follow up to #9769
2022-10-21 22:54:32 +02:00
Viktor Szakats
36474f1050
noproxy: fix builds without AF_INET6
Regression from 1e9a538e05

Reviewed-by: Daniel Stenberg

Closes #9778
2022-10-21 19:06:25 +00:00
Daniel Stenberg
1e9a538e05
noproxy: support proxies specified using cidr notation
For both IPv4 and IPv6 addresses. Now also checks IPv6 addresses "correctly"
and not with string comparisons.

Split out the noproxy checks and functionality into noproxy.c

Added unit test 1614 to verify checking functions.

Reported-by: Mathieu Carbonneaux

Fixes #9773
Fixes #5745
Closes #9775
2022-10-21 13:39:20 +02:00
Daniel Stenberg
b15ca64bb0
urlapi: remove two variable assigns
To please scan-build:

urlapi.c:1163:9: warning: Value stored to 'qlen' is never read
        qlen = Curl_dyn_len(&enc);
        ^      ~~~~~~~~~~~~~~~~~~
urlapi.c:1164:9: warning: Value stored to 'query' is never read
        query = u->query = Curl_dyn_ptr(&enc);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Follow-up to 7d6cf06f57

Closes #9777
2022-10-21 11:00:18 +02:00
Jeremy Maitin-Shepard
8698825106
cmake: improve usability of CMake build as a sub-project
- Renames `uninstall` -> `curl_uninstall`
- Ensures all export rules are guarded by CURL_ENABLE_EXPORT_TARGET

Closes #9638
2022-10-21 09:29:09 +02:00
Don Olmstead
2e69df0a26
easy_lock: check for HAVE_STDATOMIC_H as well
The check for `HAVE_STDATOMIC_H` looks to see if the `stdatomic.h`
header is present.

Closes #9755
2022-10-21 09:23:02 +02:00
Daniel Stenberg
4a5a270699
RELEASE-NOTES: synced 2022-10-21 09:20:26 +02:00
Brad Harder
6a7c776ee6
CURLMOPT_PIPELINING.3: dedup manpage xref
Closes #9776
2022-10-20 23:17:00 +02:00
Marc Hoersken
9f3d3bfb71
CI: report AppVeyor build status for each job
Also give each job on AppVeyor CI a human-readable name.

This aims to make job and therefore build failures more visible.

Reviewed-by: Marcel Raad
Closes #9769
2022-10-20 20:48:13 +02:00
Viktor Szakats
a20f74a16a
amiga: set SIZEOF_CURL_OFF_T=8 by default [ci skip]
Reviewed-by: Daniel Stenberg

Closes #9771
2022-10-20 09:10:15 +00:00
Viktor Szakats
3dc8f6f255
connect: fix builds without AF_INET6
Regression from 2b309560c1

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Closes #9770
2022-10-20 09:09:36 +00:00
Daniel Stenberg
1943fe14be
test1105: adjust <data> to work with a hyper build
Closes #9767
2022-10-20 08:58:31 +02:00
Daniel Stenberg
7d6cf06f57
urlapi: fix parsing URL without slash with CURLU_URLENCODE
When CURLU_URLENCODE is set, the parser would mistreat the path
component if the URL was specified without a slash like in
http://local.test:80?-123

Extended test 1560 to reproduce and verify the fix.

Reported-by: Trail of Bits

Closes #9763
2022-10-20 08:56:53 +02:00
Marc Hoersken
81094cb492
tests: avoid CreateThread if _beginthreadex is available
CreateThread is not threadsafe if mixed with CRT calls.
_beginthreadex on the other hand can be mixed with CRT.

Reviewed-by: Marcel Raad
Closes #9705
2022-10-19 11:59:00 +02:00
Joel Depooter
3f5a7975a5 schannel: Don't reset recv/send function pointers on renegotiation
These function pointers will have been set when the initial TLS
handshake was completed. If they are unchanged, there is no need to set
them again. If they have been changed, as is the case with HTTP/2, we
don't want to override that change. That would result in the
http22_recv/send functions being completely bypassed.

Prior to this change a connection that uses Schannel with HTTP/2 would
fail on renegotiation with error "Received HTTP/0.9 when not allowed".

Fixes https://github.com/curl/curl/issues/9451
Closes https://github.com/curl/curl/pull/9756
2022-10-19 04:07:06 -04:00
Viktor Szakats
1c567f797b
hostip: guard PF_INET6 use
Some platforms (e.g. Amiga OS) do not have `PF_INET6`. Adjust the code
for these.

```
hostip.c: In function 'fetch_addr':
hostip.c:308:12: error: 'PF_INET6' undeclared (first use in this function)
       pf = PF_INET6;
            ^~~~~~~~
```

Regression from 1902e8fc51

Reviewed-by: Daniel Stenberg

Closes #9760
2022-10-18 18:27:59 +00:00
Viktor Szakats
05d23823d7
amiga: do not hardcode openssl/zlib into the os config [ci skip]
Enable them in `lib/makefile.amiga` and `src/makefile.amiga` instead.

This allows builds without openssl and/or zlib. E.g. with the
<https://github.com/bebbo/amiga-gcc> cross-compiler.

Reviewed-by: Daniel Stenberg

Closes #9762
2022-10-18 18:22:41 +00:00
Viktor Szakats
357649c477
amigaos: add missing curl header [ci skip]
Without it, `CURLcode` and `CURLE_*` are undefined. `lib/hostip.h` and
conditional local code need them.

Reviewed-by: Daniel Stenberg

Closes #9761
2022-10-18 18:22:09 +00:00
Daniel Stenberg
ef305de95c
cmdline/docs: add a required 'multi' keyword for each option
The keyword specifies how option works when specified multiple times:

 - single: the last provided value replaces the earlier ones
 - append: it supports being provided multiple times
 - boolean: on/off values
 - mutex: flag-like option that disable anoter flag

The 'gen.pl' script then outputs the proper and unified language for
each option's multi-use behavior in the generated man page.

The multi: header is requires in each .d file and will cause build error
if missing or set to an unknown value.

Closes #9759
2022-10-18 18:50:25 +02:00
Daniel Stenberg
40f3504401
CURLOPT_AUTOREFERER.3: highlight the privacy leak risk
Closes #9757
2022-10-18 16:04:12 +02:00
Daniel Stenberg
dae84805de
mprintf: reject two kinds of precision for the same argument
An input like "%.*1$.9999d" would first use the precision taken as an
argument *and* then the precision specified in the string, which is
confusing and wrong. pass1 will now instead return error on this double
use.

Adjusted unit test 1398 to verify

Reported-by: Peter Goodman

Closes #9754
2022-10-18 08:43:40 +02:00
Daniel Stenberg
f6b9971d73
ftp: remove redundant if
Reported-by: Trail of Bits

Closes #9753
2022-10-18 08:42:46 +02:00
Daniel Stenberg
ec977b050d
tool_operate: more transfer cleanup after parallel transfer fail
In some circumstances when doing parallel transfers, the
single_transfer_cleanup() would not be called and then 'inglob' could
leak.

Test 496 verifies

Reported-by: Trail of Bits
Closes #9749
2022-10-18 08:41:38 +02:00
Daniel Stenberg
3ccaddc9fc
mqtt: spell out CONNECT in comments
Instead of calling it 'CONN' in several comments, use the full and
correct protocol packet name.

Suggested by Trail of Bits

Closes #9751
2022-10-17 16:18:40 +02:00
Daniel Stenberg
d345ebfcda
CURLOPT_POSTFIELDS.3: refer to CURLOPT_MIMEPOST
Not the deprecated CURLOPT_HTTPPOST option.

Also added two see-alsos.

Reported-by: Trail of Bits
Closes #9752
2022-10-17 16:09:22 +02:00
Daniel Stenberg
e335d778e3
RELEASE-NOTES: synced 2022-10-17 10:41:17 +02:00
Jay Satiro
6b066de488 ngtcp2: Fix build errors due to changes in ngtcp2 library
ngtcp2/ngtcp2@b0d86f60 changed:

- ngtcp2_conn_get_max_udp_payload_size =>
  ngtcp2_conn_get_max_tx_udp_payload_size

- ngtcp2_conn_get_path_max_udp_payload_size =>
  ngtcp2_conn_get_path_max_tx_udp_payload_size

ngtcp2/ngtcp2@ec59b873 changed:

- 'early_data_rejected' member added to ng_callbacks.

Assisted-by: Daniel Stenberg
Reported-by: jurisuk@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/9747
Closes https://github.com/curl/curl/pull/9748
2022-10-17 03:27:03 -04:00
Daniel Stenberg
025bad1182
curl_path: return error if given a NULL homedir
Closes #9740
2022-10-16 23:49:23 +02:00