| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the data needs to be "line-based" anyway since it's also passed to the
debug callback/application
- it makes infof() work like failf() and consistency is good
- there's an assert that triggers on newlines in the format string
- Also removes a few instances of "..."
- Removes the code that would append "..." to the end of the data *iff*
it was truncated in infof()
Closes #7357
|
|
|
|
|
|
|
| |
... as we never use the return codes from them.
Reviewed-by: Daniel Gustafsson
Closes #7319
|
|
|
|
| |
Closes #7271
|
|
|
|
|
|
|
|
|
|
|
| |
The libssh2 backend has SSH session associated with the connection but
the callback context is the easy handle, so when a connection gets
attached to a transfer, the protocol handler now allows for a custom
function to get used to set things up correctly.
Reported-by: Michael O'Farrell
Fixes #6898
Closes #7078
|
|
|
|
|
|
|
|
|
|
|
|
| |
... to avoid memory leaks!
libssh2 is tricky as we have to deal with the non-blockiness even in
close and shutdown cases. In the cases when we shutdown after a timeout
already expired, it is crucial that curl doen't let the timeout abort
the shutdown process as that then leaks memory!
Reported-by: Benjamin Riefenstahl
Fixes #6990
|
|
|
|
|
|
| |
... remove '== NULL' and '!= 0'
Closes #6912
|
|
|
|
|
|
| |
Pointed out by scan-build
Closes #6900
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the recent conn/data refactor in this source file, this function
was mistakenly still getting the old struct pointer which would lead to
crash on servers with keyboard-interactive auth enabled.
Follow-up to a304051620b92e12b (shipped in 7.75.0)
Reported-by: Christian Schmitz
Fixes #6691
Closes #6782
|
|
|
|
|
|
|
|
|
| |
If libssh2_knownhost_init() returns NULL, like in an OOM situation, the
ssh session was freed but the pointer wasn't cleared which made libcurl
later call libssh2 to cleanup using the stale pointer.
Fixes #6764
Closes #6766
|
|
|
|
|
|
|
|
|
| |
and rename it from 'ftp_list_only' since it is also used for SSH and
POP3. The state is updated internally for 'type=D' FTP URLs.
Added test case 1570 to verify.
Closes #6578
|
|
|
|
|
|
|
|
|
|
| |
Since the set value then risks getting used like that when the easy
handle is reused by the application.
Also: renamed the struct field from 'ftp_append' to 'remote_append'
since it is also used for SSH protocols.
Closes #6579
|
|
|
|
|
|
|
| |
Follow-up to 2dcc940959772a
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/2dcc940959772a652f6813fb6bd3092095a4877b#commitcomment-46420088
|
|
|
|
|
|
|
|
| |
Readdir data, filenames and attributes are strictly related to the
transfer and not the connection. This also reduces the total size of the
fixed connectdata struct.
Closes #6519
|
|
|
|
| |
Closes #6487
|
|
|
|
| |
Closes #6479
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... in most cases instead of 'struct connectdata *' but in some cases in
addition to.
- We mostly operate on transfers and not connections.
- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).
- This work clarifies and separates the transfers from the connections
better.
- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.
Closes #6425
|
|
|
|
| |
Detected by scan-build
|
|
|
|
|
|
|
|
| |
We currently use both spellings the british "behaviour" and the american
"behavior". However "behavior" is more used in the project so I think
it's worth dropping the british name.
Closes #6395
|
|
|
|
|
|
|
|
|
| |
... as failf adds one itself.
Also: add an assert() to failf() that triggers on a newline in the
format string!
Closes #6365
|
|
|
|
|
|
| |
Update a few format specifiers to match what is being printed.
Closes #6241
|
|
|
|
|
|
|
| |
... to avoid the use of 'void *' for the protocol specific structs done
per transfer.
Closes #6238
|
|
|
|
| |
Closes #6172
|
|
|
|
|
|
| |
Saves us from having the same check done everywhere.
Closes #6159
|
|
|
|
|
|
|
|
| |
The fix in #6021 was not enough. This fix makes sure SCP/SFTP content
can also be transfered over a HTTPS proxy.
Fixes #6113
Closes #6128
|
|
|
|
|
|
|
|
|
|
| |
Build breaks because the http_proxy field is missing:
vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy'
Regression from #6021, shipped in curl 7.73.0
Closes #6125
|
|
|
|
|
|
|
| |
... and simplify the code accordingly. libssh2 version 1.0 was released
in April 2009.
Closes #6116
|
|
|
|
|
|
| |
Reported-by: Robin Douine
Fixes #4295
Closes #6021
|
|
|
|
|
|
|
| |
Makes get_protocol_family() faster and it moves the knowledge about the
"families" to each protocol handler, where it belongs.
Closes #5986
|
|
|
|
| |
Closes #5909
|
|
|
|
|
|
| |
Replace the old fingerprint of the host with a new.
Closes #5685
|
|
|
|
| |
Closes #5810
|
|
|
|
|
|
|
|
|
|
|
| |
The debug output used ssherr instead of sftperr which not only outputs
the wrong error code but also casues a warning on Windows.
Follow-up to 7370b4e39f1
Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/7370b4e39f1390e701f5b68d910c619151daf72b#r41334700
Closes #5799
|
|
|
|
|
|
|
| |
Remove weird work-around for storing the SFTP errors as int instead of
the "unsigned long" that libssh2 actually returns for SFTP errors.
Closes #5534
|
|
|
|
|
|
|
| |
For millisecond timers we like timediff_t better. Also, time_t can be
unsigned so returning a negative value doesn't work then.
Closes #5479
|
|
|
|
|
|
| |
Reported-by: Werner Stolz
Closes #5474
|
|
|
|
|
|
|
|
| |
This reverts commit f31760e63b4e9ef1eb25f8f211390f8239388515. Shipped in
curl 7.54.1.
Bug: https://curl.haxx.se/mail/lib-2020-05/0068.html
Closes #5465
|
| |
|
|
|
|
|
|
|
|
| |
In my very basic test that lists sftp://127.0.0.1/tmp/, this patched
code makes 161 allocations compared to 194 in git master. A 17%
reduction.
Closes #5336
|
|
|
|
|
|
|
|
|
| |
... as otherwise the progress callback gets called without that
information, making the progress meter have less info.
Reported-by: Murugan Balraj
Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html
Closes #5317
|
|
|
|
|
|
|
|
| |
This fix adds a defensive check for the case where the char *name in
struct libssh2_knownhost is NULL
Fixes #5041
Closes #5062
|
|
|
|
|
|
| |
Spotted by 'codespell'
Closes #4957
|
|
|
|
|
|
|
| |
This led to a conversion warning on 64-bit MinGW, which has 32-bit
`long` but 64-bit `size_t`.
Closes https://github.com/curl/curl/pull/4823
|
|
|
|
|
|
| |
Follow-up to recent commits
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Allow forcing the host's key type found in the known_hosts file.
Currently, curl (with libssh2) does not take keys from your known_hosts
file into account when talking to a server. With this patch the
known_hosts file will be searched for an entry matching the hostname
and, if found, libssh2 will be told to claim this key type from the
server.
Closes https://github.com/curl/curl/pull/4747
|
|
|
|
|
|
|
|
| |
... if a new enough libssh2 version is present.
Source: https://curl.haxx.se/mail/archive-2019-12/0023.html
Co-Authored-by: Daniel Stenberg
Closes #4714
|
|
|
|
| |
Closes https://github.com/curl/curl/pull/4444
|
|
|
|
|
| |
Fixes warning detected by PVS-Studio
Fixes #4374
|
|
|
|
| |
Closes #4235
|
| |
|