Fix configuration handling with empty password

master
Daniel Berteaud 10 years ago
parent c5a19d6a3d
commit 3c74404321
  1. 2
      vroom.pl

@ -1367,7 +1367,7 @@ any '/api' => sub {
$room->{locked} = ($req->{param}->{locked}) ? '1' : '0'; $room->{locked} = ($req->{param}->{locked}) ? '1' : '0';
$room->{ask_for_name} = ($req->{param}->{ask_for_name}) ? '1' : '0'; $room->{ask_for_name} = ($req->{param}->{ask_for_name}) ? '1' : '0';
foreach my $pass (qw/join_password owner_password/){ foreach my $pass (qw/join_password owner_password/){
if (!$req->{param}->{$pass}){ if ($req->{param}->{$pass} eq Mojo::JSON->false){
$room->{$pass} = undef; $room->{$pass} = undef;
} }
elsif ($req->{param}->{$pass} ne ''){ elsif ($req->{param}->{$pass} ne ''){

Loading…
Cancel
Save