Detect peer EOF and TLS closure before reusing idle connections. Make
disconnect idempotent while preserving buffered data and pending operation
lifetimes.
Keep the release branch's multi-byte recv_n behavior, and cover partial EOF,
socket modes, and TLS shutdown with loopback regression tests. Use fixed
test certificates and retain compatibility with the release branch's
Google Test version.
Co-authored-by: woodser <13068859+woodser@users.noreply.github.com>
(cherry picked from commit 096abdaa22b71ade9ca673ed8012c500cecb58d3)
The handshake timeout should just be an absolute timeout, we don't
care about partial messages received during the handshake.
(cherry picked from commit c7c43686878166cd0b93bed0cc712c8dd9845c89)
Identified by @selsta
Callers can otherwise misinterpret int -1 as truthy success,
e.g. see make_payload_send_txs
(cherry picked from commit 9bf193728bb11beb9c40e06a0d48d1c697fe7a84)
foreach_connection() can race with connection destruction while the
protocol handler remains in the raw-pointer map. Use the non-throwing
weak_from_this().lock() in add_ref() and treat expired connections as
unavailable.
This is an interim mitigation pending the broader connection lifetime
fix in PR 7345.
(cherry picked from commit 146f801063b85e23b635c235100cc241e4ab626a)
- Make sure the server sends a complete response when the client
includes the "Connection: close" header.
- Make sure the server terminates in `m_strand` to avoid
concurrent socket closure and ops processing.
(cherry picked from commit ee9e4a49baae0319f6cab543979e221f251339a3)
The RSA-MD licensed implementation that originated from RFC 1321 and got
into epee via Cyrus SASL and libEtPan! is not a good fit for epee, which
also links to the GPL licensed readline. RSA-MD has an advertisement
clause that is known to be incompatible with GPL.
quick patch which fixes the issue where if you use some macros from `http_server_handlers_map2.h` you have to be in the `epee` namespace or it doesn't compile. Now can remove `using namespace epee;` from header file `core_rpc_server.h`, which caused a couple of name qualifying mistakes
Replace all calls to epee::file_io::get_file_size with
boost::filesystem::file_size in order to avoid lossy conversions from
paths to strings, which tend to break filename resolution. This commit
fixes a bug on Windows where the get_info RPC call reported a zero
database size because BlockchainLMBD::get_database_size returned zero.
On Linux Mint 21.3, g++ Ubuntu 11.4.0-1ubuntu1~22.04, I get linking error for an undefined reference to `epee::string_tools::trim_right`. This PR reverts the changes
to epee_readline.cpp in commit c56ee140, which turns a `boost::trim_right` callsite into an `epee::string_tools::trim_right` callsite.
1. Use std::is_standard_layout and std::is_trivially_copyable instead of std::is_pod for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Removed reimplementation of std::hash for boost::uuids::uuid
3. Removed << operator overload for crypto::secret_key
4. Removed instances in code where private view key was dumped to the log in plaintext
Release version of #9450, containing C++14 modified assertions