1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 16:45:06 -05:00
Commit Graph

25580 Commits

Author SHA1 Message Date
Marc Hoersken
49fbe01908
ci/tests: install impacket for SMB tests on FreeBSD using CirrusCI
Also force the package index/cache to be updated before installing.

Closes #5103
2020-03-15 13:38:41 +01:00
Marc Hoersken
92f129cd9f
tests/README: add note about manually installing python-impacket
Follow up to 4be2560
2020-03-15 12:34:17 +01:00
Daniel Stenberg
f38c7290b1
transfer: cap retries of "dead connections" to 5
When libcurl retries a connection due to it being "seemingly dead" or by
REFUSED_STREAM, it will now only do it up five times before giving up,
to avoid never-ending loops.

Reported-by: Dima Tisnek
Bug: https://curl.haxx.se/mail/lib-2020-03/0044.html
Closes #5074
2020-03-15 11:43:47 +01:00
Daniel Stenberg
51fde33747
TODO: TLS-PSK with OpenSSL
Closes #5081
2020-03-15 11:34:14 +01:00
Marc Hoersken
696cfc0f6c
select: add 'timeout_ms' wrap-around precaution to Curl_select 2020-03-15 11:08:27 +01:00
Marc Hoersken
041e778f1e
select: fix 'pending_ms' is assigned a value that is never used
Detected by Codacy
2020-03-15 11:08:27 +01:00
Marc Hoersken
c52b342051
select: move duplicate select preparation code into Curl_select
Reviewed by Daniel Stenberg
Reviewed by Marcel Raad
Closes #5078
2020-03-15 11:08:27 +01:00
Daniel Stenberg
dbd16c3e25
connect: happy eyeballs cleanup
Make sure each separate index in connn->tempaddr[] is used for a fixed
family (and only that family) during the connection process.

If family one takes a long time and family two fails immediately, the
previous logic could misbehave and retry the same family two address
repeatedly.

Reported-by: Paul Vixie
Reported-by: Jay Satiro
Fixes #5083
Fixes #4954
Closes #5089
2020-03-15 11:03:11 +01:00
Marc Hoersken
dc595210ae
ci/tests: fix and align setting TFLAGS for make test-nonflaky 2020-03-15 10:02:17 +01:00
Marc Hoersken
ac56683438
ci/tests: install test suite dependencies stunnel and impacket 2020-03-15 10:02:11 +01:00
Marc Hoersken
4be2560e01
tests: remove python_dependencies for smbserver from our tree
Users of the SMB tests will have to install impacket manually.

Reasoning: our in-tree version of impacket was quite outdated
and only compatible with Python 2 which is already end-of-life.
Upgrading to Python 3 and a compatible impacket version would
require to import additional Python-only and CPython-extension
dependencies. This would have hindered portability enormously.

Closes #5094
2020-03-15 10:01:38 +01:00
Jay Satiro
67f3f6cff1 Makefile.m32: Improve windres parameter compatibility
- s/COFF/coff/

Some versions of windres do not recognize uppercase COFF as a valid
way to specify the COFF output format.

Reported-by: Steven Penny

Fixes https://github.com/curl/curl/issues/5099
Closes https://github.com/curl/curl/pull/5101
2020-03-14 19:08:17 -04:00
Jay Satiro
3bfda07004 easy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares
- Ignore CURLE_NOT_BUILT_IN errors returned by c-ares functions in
  curl_easy_duphandle.

Prior to this change if c-ares was used as the resolver backend and
either it was too old or libcurl was built without IPv6 support then
some of our resolver functions could return CURLE_NOT_BUILT_IN to
curl_easy_duphandle causing it to fail.

Caused by c8f086b which shipped in 7.69.1.

Reported-by: Karl Chen

Fixes https://github.com/curl/curl/issues/5097
Closes https://github.com/curl/curl/pull/5100
2020-03-14 19:07:05 -04:00
Daniel Stenberg
0845ecbb6d
docs: add warnings about FILE: URLs on Windows
- --url man page section
 - libcurl-security.3 gets the full text
 - CURLOPT_URL.3

Reported-by: Tim Sedlmeyer
2020-03-13 16:56:41 +01:00
Daniel Stenberg
fe8ba51209
server/getpart: make the "XML-parser" stricter
When extracting a <section> <part> and there's no </part> before
</section>, this now outputs an error and returns a wrong string to
make users spot the mistake.

Ref: #5070
Closes #5071
2020-03-13 11:03:42 +01:00
Marc Hoersken
a7e24c7362
impacket: some more Python 3 code compatibility updates
This makes smbserver load on Python 3, but still not work completely.
2020-03-13 02:49:07 +01:00
Marc Hoersken
ba0e6fbd30
smbserver: pin Python version to 2 since we are not yet 3 compatible
Even though the existing code can be fixed to run on Python 3, the
tests will fail due to the Unicode transition the protocol is invalid.

Follow up to ee63837
Closes #5085
2020-03-13 02:48:48 +01:00
Viktor Szakats
af07875c0d
cleanup: fix some text/comment typos
Closes #5087
2020-03-12 14:28:17 +01:00
Marc Hoersken
d5c01d779f
smbserver: fix Python version specific ConfigParser import
Follow up to ee63837 and 8c7c4a6
Fixes #5077
2020-03-12 09:15:36 +01:00
Daniel Stenberg
4674269633
RELEASE-NOTES: synced
bumped to 7.69.2
2020-03-11 11:07:53 +01:00
Dan Fandrich
c0fe3b3260 tests/data: Fix some XML formatting issues in test cases
This allows these test files to pass xmllint.
2020-03-11 10:33:03 +01:00
Muhammad Herdiansyah
0cc66ff5a4
Makefile: run the cd commands in a subshell
In bmake, if the directory is changed (with cd or anything else), bmake
won't return to the "root directory" on the next command (in the same
Makefile rule). This commit runs the cd command in a subshell so it
would work in bmake.

Closes #5073
2020-03-11 10:15:06 +01:00
Daniel Stenberg
27ea8fc2fa
configure: convert -I to -isystem as a last step
As all the -I uses in CFLAGS at that point are for system headers and
third party libraries this helps us remove/ignore warnings on those!

Closes #5060
2020-03-11 08:51:25 +01:00
Daniel Stenberg
77b62fe6e1
configure: fix -pedantic-errors for GCC 5 and later
If --enable-werror is used.

Follow-up to d5c0351055 which added it too early in the configure
script before $compiler_num was set correctly and thus this option was
never used.

Reported-by: Stepan Efremov
Fixes #5067
Closes #5068
2020-03-11 08:49:20 +01:00
Daniel Stenberg
f0f3952f55
configure: document 'compiler_num' for gcc
The CURL_CHECK_COMPILER_GNU_C function sets the number to MAJOR*100 +
MINOR and ignores the patch version, and since gcc version 7 it only
sets it to MAJOR*100.

Reported-by: Stepan Efremov
Ref: #5067
Closes #5069
2020-03-11 08:47:59 +01:00
Daniel Stenberg
b81e0b0778
RELEASE-NOTES: 7.69.1 2020-03-11 00:36:18 +01:00
Daniel Stenberg
2d47224e1c
THANKS: from the 7.69.1 release 2020-03-11 00:36:17 +01:00
Marc Hoersken
fb6134427a
test1129: fix invalid case of closing XML-tag and Content-Length
Fixes #5070
Closes #5072
2020-03-10 22:38:56 +01:00
Marc Hoersken
f11b2cb62b
tests/data: fix static ip instead of dynamic value being used
Follow up to 94ced8e
2020-03-10 13:31:19 +01:00
Marc Hoersken
94ced8e368
tests/data: fix static ip:port instead of dynamic values being used
Closes #5065
2020-03-10 03:56:50 +01:00
Marc Hoersken
26c5ba0e65
tests/server: fix missing use of exe_ext helper function
Follow up to 9819984 and 3dce984
Reviewed-By: Daniel Stenberg
Closes #5064
2020-03-10 03:56:17 +01:00
Marc Hoersken
4d43d06143
runtests: log minimal and maximal used port numbers 2020-03-10 03:55:37 +01:00
Jim Fuller
e96fe70cab
sftp: fix segfault regression introduced by #4747
This fix adds a defensive check for the case where the char *name in
struct libssh2_knownhost is NULL

Fixes #5041
Closes #5062
2020-03-09 15:01:40 +01:00
Daniel Stenberg
464d944b51
RELEASE-NOTES: synced 2020-03-08 23:22:02 +01:00
Daniel Stenberg
f0e8160545
socks4: fix host resolve regression
1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
Closes #5061
2020-03-08 22:51:47 +01:00
Patrick Monnerat
77336671dc
silly web server: silent a compilation warning
Recent gcc warns when byte count of strncpy() equals the destination
buffer size. Since the destination buffer is previously cleared and
the source string is always shorter, reducing the byte count by one
silents the warning without affecting the result.

Closes #5059
2020-03-08 17:30:55 +01:00
Patrick Monnerat
06a1b82140
cookie: get_top_domain() sets zero length for null domains
This silents a compilation warning with gcc -O3.
2020-03-08 17:30:55 +01:00
Patrick Monnerat
a75f12768d
test 1560: avoid valgrind false positives
When using maximum code optimization level (-O3), valgrind wrongly
detects uses of uninitialized values in strcmp().

Preset buffers with all zeroes to avoid that.
2020-03-08 17:30:55 +01:00
Steve Holme
1369b8ad31
sha256: Added WinCrypt implementation
Closed #5030
2020-03-08 11:45:28 +00:00
Steve Holme
92d63a10aa
sha256: Added SecureTransport implementation 2020-03-08 11:45:24 +00:00
Daniel Stenberg
0a04dc4d5d
lib1564: reduce number of mid-wait wakeup calls
This test does A LOT of *wakeup() calls and then calls curl_multi_poll()
twice. The first *poll() is then expected to return early and the second
not - as the first is supposed to drain the socketpair pipe.

It turns out however that when given "excessive" amounts of writes to
the pipe, some operating systems (the Solaris based are known) will
return EAGAIN before the pipe is drained, which in our test case causes
the second *poll() call to also abort early.

This change attempts to avoid the OS-specific behaviors in the test by
reducing the amount of wakeup calls from 1234567 to 10.

Reported-by: Andy Fiddaman
Fixes #5037
Closes #5058
2020-03-07 23:27:58 +01:00
Patrick Monnerat
e5b366c0b5
mime: fix the binary encoder to handle large data properly
New test 666 checks this is effective.
As upload buffer size is significant in this kind of tests, shorten it
in similar test 652.

Fixes #4860
Closes #4833
Reported-by: RuurdBeerstra on github
2020-03-07 23:26:15 +01:00
Patrick Monnerat
1e4cb333ef
mime: do not perform more than one read in a row
Input buffer filling may delay the data sending if data reads are slow.
To overcome this problem, file and callback data reads do not accumulate
in buffer anymore. All other data (memory data and mime framing) are
considered as fast and still concatenated in buffer.
As this may highly impact performance in terms of data overhead, an early
end of part data check is added to spare a read call.
When encoding a part's data, an encoder may require more bytes than made
available by a single read. In this case, the above rule does not apply
and reads are performed until the encoder is able to deliver some data.

Tests 643, 644, 645, 650 and 654 have been adapted to the output data
changes, with test data size reduced to avoid the boredom of long lists of
1-byte chunks in verification data.
New test 667 checks mimepost using single-byte read callback with encoder.
New test 668 checks the end of part data early detection.

Fixes #4826
Reported-by: MrdUkk on github
2020-03-07 23:26:00 +01:00
Patrick Monnerat
96972ec1c0
mime: latch last read callback status.
In case a read callback returns a status (pause, abort, eof,
error) instead of a byte count, drain the bytes read so far but
remember this status for further processing.
Takes care of not losing data when pausing, and properly resume a
paused mime structure when requested.
New tests 670-673 check unpausing cases, with easy or multi
interface and mime or form api.

Fixes #4813
Reported-by: MrdUkk on github
2020-03-07 23:26:00 +01:00
Marc Hoersken
3dce9849be
runtests: fix missing use of exe_ext helper function 2020-03-07 20:16:10 +01:00
Ernst Sjöstrand
c8f086bcc3
ares: store dns parameters for duphandle
With c-ares the dns parameters lives in ares_channel. Store them in the
curl handle and set them again in easy_duphandle.

Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0.

Fixes #4893
Closes #5020
Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
2020-03-07 13:50:23 +01:00
Daniel Stenberg
e364546fb3
version: make curl_version* thread-safe without using global context
Closes #5010
2020-03-07 12:10:11 +01:00
Daniel Stenberg
310dc709ff
RELEASE-NOTES: synced 2020-03-07 11:22:23 +01:00
Marc Hoersken
a6fed41f6f
tests: use native Sleep function as fallback on Windows
Reviewed-By: Daniel Stenberg
Closes #5054
2020-03-07 11:02:43 +01:00
Marc Hoersken
99c688ba21
perl: align order and completeness of Windows OS checks 2020-03-07 11:02:43 +01:00