Censor user password when logging Authenticate message

This commit is contained in:
Jonas Herzig 2020-11-25 12:45:59 +01:00
parent c4ef94aa16
commit 8b74065b80

View file

@ -471,7 +471,13 @@ impl Connection {
) -> Result<(), Error> {
match packet {
ControlPacket::Authenticate(mut message) => {
println!("MSG Authenticate: {:?}", message);
println!("MSG Authenticate: {:?}", {
let mut message = message.clone();
if message.get_password() != "" {
message.set_password("{{snip}}".to_string());
}
message
});
if message.get_webrtc() {
// strip webrtc support from the connection (we will be providing it)
message.clear_webrtc();