Skip to content
Snippets Groups Projects
Commit 9a9a81ea authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix telnet binary mode tracking.

When SyncTERM started by enabling binary mode in both directions,
the internal tracking of the binary status wasn't updated, so it
was incorrectly tracked as being in NVT mode.  After a file
transfer, it would then revert to the NVT mode it throught it was
in.

This change updates the binary mode value when sending as well as
receiving TELNET_BINARY_TX.

This is still technically broken though since binary mode is
negotiated separately in each direction, and the initial send of
WILL + DO is actually a pair of requests that need to be confirmed
by the remote.  Until they are confirmed, the connection is still
in NVT mode.

Hopefully though this isn't an issue since the remote should reply
to both, and if it denies there's no effective difference between
what we should do when already in binary mode and not because we
don't support any other modes (such as CHARSET option).  Fixing it
correctly would get very complex and involve blocking the connection
until we get a response.
parent 4b0ff813
No related branches found
No related tags found
No related merge requests found
Pipeline #8826 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment