You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can happen that messages returned by the server start with control characters (non-printable characters) but after those control characters comes a valid message (starting with a '+') from the server. Those control characters should not be taken into account when checking a message for validity.
We get this on a very regular basis and getting an exception each time is very annoying. We handle exceptions by logging them and the log file gets swamped by the exceptions that are being thrown because of this.
The utility method ReadLineAsBytes in StreamUtility.cs should also include a check for control characters in the following piece of code.
// Do not write \r or \nif(readChar!='\r'&&readChar!='\n')
memoryStream.WriteByte((byte)justRead);
It only needs to be altered as follows.
// Do not write \r or \nif(readChar!='\r'&&readChar!='\n'&&!char.IsControl(readChar))
memoryStream.WriteByte((byte)justRead);
The text was updated successfully, but these errors were encountered:
It can happen that messages returned by the server start with control characters (non-printable characters) but after those control characters comes a valid message (starting with a '+') from the server. Those control characters should not be taken into account when checking a message for validity.
We get this on a very regular basis and getting an exception each time is very annoying. We handle exceptions by logging them and the log file gets swamped by the exceptions that are being thrown because of this.
The utility method
ReadLineAsBytes
in StreamUtility.cs should also include a check for control characters in the following piece of code.It only needs to be altered as follows.
The text was updated successfully, but these errors were encountered: