Data from received from the network is untrusted, but rust relies on strings being valid UTF-8 for safety. Replace from_utf8_unchecked with from_utf8 to avoid this potential security hole.
You are absolutely correct. I did that as a shortcut (because we are sending data from Rust to Rust) and as a temporary solution. We will soon be sending proper packets instead of plain text
Data from received from the network is untrusted, but rust relies on strings being valid UTF-8 for safety. Replace
from_utf8_unchecked
withfrom_utf8
to avoid this potential security hole.