Log when passwords are being set/unset

master
Daniel Berteaud 9 years ago
parent 489ad3aaae
commit 38f3083937
  1. 4
      vroom.pl

@ -445,8 +445,8 @@ helper modify_room => sub {
foreach my $field (keys %$room){ foreach my $field (keys %$room){
if (($old_room->{$field} // '' ) ne ($room->{$field} // '')){ if (($old_room->{$field} // '' ) ne ($room->{$field} // '')){
if ($field =~ m/_password$/){ if ($field =~ m/_password$/){
$old_room->{$field} = '<hidden>'; $old_room->{$field} = ($old_room->{$field}) ? '<hidden>' : '<unset>';
$room->{$field} = '<hidden>'; $room->{$field} = ($room->{$field}) ? '<hidden>' : '<unset>';
} }
$mods .= $field . ": " . $old_room->{$field} . ' -> ' . $room->{$field} . "\n"; $mods .= $field . ": " . $old_room->{$field} . ' -> ' . $room->{$field} . "\n";
} }

Loading…
Cancel
Save