Censor user password when logging Authenticate message

master
Jonas Herzig 2020-11-25 12:45:59 +01:00
parent c4ef94aa16
commit 8b74065b80
1 changed files with 7 additions and 1 deletions

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();