Skip to main content

sanitize_for_log

Function sanitize_for_log 

Source
pub fn sanitize_for_log(s: &str) -> String
Expand description

Sanitize a string for safe log output by escaping control characters. Prevents log injection where attackers embed newlines to forge log entries.