GUAC-763: Remove stripping of non-printable chars. It will break UTF-8, and the signedness of line_buffer makes the comparisons questionable.
This commit is contained in:
parent
e01eb6fc10
commit
b2c6bc488b
@ -122,13 +122,6 @@ static bool __guac_telnet_regex_search(guac_client* client, regex_t* regex, char
|
||||
length += size;
|
||||
line_buffer[length] = '\0';
|
||||
|
||||
/* Remove non-printable characters as they interfere with regex matching */
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (line_buffer[i] <= 31 || (line_buffer[i] >= 128 && line_buffer[i] <= 255)) {
|
||||
line_buffer[i] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
/* Send password upon match */
|
||||
if (regexec(regex, line_buffer, 0, NULL, 0) == 0) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user