Fix UTF-8 validation
This commit is contained in:
parent
2e1127e371
commit
19e10aaf3e
@ -1958,7 +1958,7 @@ backend_ws_on_frame (void *user_data, const struct ws_parser *parser)
|
||||
return true;
|
||||
|
||||
if (self->message_opcode == WS_OPCODE_TEXT
|
||||
&& !utf8_validate (self->parser.input.str, self->parser.input.len))
|
||||
&& !utf8_validate (self->message_data.str, self->message_data.len))
|
||||
return backend_ws_fail (self, WS_STATUS_INVALID_PAYLOAD_DATA);
|
||||
|
||||
bool result = backend_ws_on_message (self, self->message_opcode,
|
||||
|
Loading…
Reference in New Issue
Block a user