* Fixed how passwords are supressed in logs.

* Fixed config step 2 display.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 7 years ago
parent 2d88502f6a
commit 1539ef72a8
  1. 4
      Anvil/Tools/Account.pm
  2. 24
      Anvil/Tools/Database.pm
  3. 4
      Anvil/Tools/Get.pm
  4. 6
      Anvil/Tools/Remote.pm
  5. 20
      Anvil/Tools/Storage.pm
  6. 6
      Anvil/Tools/System.pm
  7. 16
      cgi-bin/home
  8. 2
      tools/anvil-change-password
  9. 2
      tools/anvil-configure-striker

@ -128,7 +128,7 @@ sub encrypt_password
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
algorithm => $algorithm, algorithm => $algorithm,
hash_count => $hash_count, hash_count => $hash_count,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
salt => $salt, salt => $salt,
}}); }});
@ -711,7 +711,7 @@ sub validate_password
my $valid = 0; my $valid = 0;
my $hash = ""; my $hash = "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
user => $user, user => $user,
}}); }});

@ -676,7 +676,7 @@ sub connect
port => $port, port => $port,
name => $name, name => $name,
user => $user, user => $user,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
}}); }});
# Some places will want to pull up the database user, so in case it isn't set (which is # Some places will want to pull up the database user, so in case it isn't set (which is
@ -715,7 +715,7 @@ sub connect
port => $port, port => $port,
name => $name, name => $name,
user => $user, user => $user,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
}}); }});
### TODO: Can we do a telnet port ping with a short timeout instead of a shell ping call? ### TODO: Can we do a telnet port ping with a short timeout instead of a shell ping call?
@ -986,7 +986,7 @@ sub connect
"database::${uuid}::port" => $anvil->data->{database}{$uuid}{port}, "database::${uuid}::port" => $anvil->data->{database}{$uuid}{port},
"database::${uuid}::name" => $database_name, "database::${uuid}::name" => $database_name,
"database::${uuid}::user" => $database_user, "database::${uuid}::user" => $database_user,
"database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : "#!string!log_0186!#", "database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : $anvil->Words->string({key => "log_0186"}),
}}); }});
# Copy my alert hash before I delete the uuid. # Copy my alert hash before I delete the uuid.
@ -1045,7 +1045,7 @@ sub connect
"database::${uuid}::port" => $anvil->data->{database}{$uuid}{port}, "database::${uuid}::port" => $anvil->data->{database}{$uuid}{port},
"database::${uuid}::name" => $database_name, "database::${uuid}::name" => $database_name,
"database::${uuid}::user" => $database_user, "database::${uuid}::user" => $database_user,
"database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : "#!string!log_0186!#", "database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : $anvil->Words->string({key => "log_0186"}),
}}); }});
### TODO: Is this still an issue? If so, then we either need to require that the DB host ### TODO: Is this still an issue? If so, then we either need to require that the DB host
@ -3377,7 +3377,7 @@ sub insert_or_update_users
line => $line, line => $line,
user_uuid => $user_uuid, user_uuid => $user_uuid,
user_name => $user_name, user_name => $user_name,
user_password_hash => (($anvil->Log->secure) or ($user_salt)) ? $user_password_hash : "#!string!log_0186!#" , user_password_hash => (($anvil->Log->secure) or ($user_salt)) ? $user_password_hash : $anvil->Words->string({key => "log_0186"}) ,
user_salt => $user_salt, user_salt => $user_salt,
user_algorithm => $user_algorithm, user_algorithm => $user_algorithm,
user_hash_count => $user_hash_count, user_hash_count => $user_hash_count,
@ -3427,7 +3427,7 @@ sub insert_or_update_users
$user_algorithm = $answer->{user_algorithm}; $user_algorithm = $answer->{user_algorithm};
$user_hash_count = $answer->{user_hash_count}; $user_hash_count = $answer->{user_hash_count};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
user_password_hash => (($anvil->Log->secure) or ($user_salt)) ? $user_password_hash : "#!string!log_0186!#" , user_password_hash => (($anvil->Log->secure) or ($user_salt)) ? $user_password_hash : $anvil->Words->string({key => "log_0186"}) ,
user_salt => $user_salt, user_salt => $user_salt,
user_algorithm => $user_algorithm, user_algorithm => $user_algorithm,
user_hash_count => $user_hash_count, user_hash_count => $user_hash_count,
@ -4347,7 +4347,7 @@ sub query
uuid => $uuid, uuid => $uuid,
"cache::db_fh::${uuid}" => $anvil->data->{cache}{db_fh}{$uuid}, "cache::db_fh::${uuid}" => $anvil->data->{cache}{db_fh}{$uuid},
line => $line, line => $line,
query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : "#!string!log_0186!#", query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : $anvil->Words->string({key => "log_0186"}),
secure => $secure, secure => $secure,
source => $source, source => $source,
}}); }});
@ -4394,14 +4394,14 @@ sub query
# Do the query. # Do the query.
my $DBreq = $anvil->data->{cache}{db_fh}{$uuid}->prepare($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0075", variables => { my $DBreq = $anvil->data->{cache}{db_fh}{$uuid}->prepare($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0075", variables => {
query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : "#!string!log_0186!#", query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : $anvil->Words->string({key => "log_0186"}),
server => $say_server, server => $say_server,
db_error => $DBI::errstr, db_error => $DBI::errstr,
}}); }});
# Execute on the query # Execute on the query
$DBreq->execute() or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0076", variables => { $DBreq->execute() or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0076", variables => {
query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : "#!string!log_0186!#", query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : $anvil->Words->string({key => "log_0186"}),
server => $say_server, server => $say_server,
db_error => $DBI::errstr, db_error => $DBI::errstr,
}}); }});
@ -4919,7 +4919,7 @@ sub write
uuid => $uuid, uuid => $uuid,
"cache::db_fh::${uuid}" => $anvil->data->{cache}{db_fh}{$uuid}, "cache::db_fh::${uuid}" => $anvil->data->{cache}{db_fh}{$uuid},
line => $line, line => $line,
query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : "#!string!log_0186!#", query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : $anvil->Words->string({key => "log_0186"}),
secure => $secure, secure => $secure,
source => $source, source => $source,
reenter => $reenter, reenter => $reenter,
@ -5068,7 +5068,7 @@ sub write
# Do the do. # Do the do.
$anvil->data->{cache}{db_fh}{$uuid}->do($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0090", variables => { $anvil->data->{cache}{db_fh}{$uuid}->do($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0090", variables => {
query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : "#!string!log_0186!#", query => ((not $secure) or (($secure) && (not $anvil->Log->secure))) ? $query : $anvil->Words->string({key => "log_0186"}),
server => $say_server, server => $say_server,
db_error => $DBI::errstr, db_error => $DBI::errstr,
}}); }});
@ -5286,7 +5286,7 @@ sub _find_behind_databases
"database::${uuid}::port" => $anvil->data->{database}{$uuid}{port}, "database::${uuid}::port" => $anvil->data->{database}{$uuid}{port},
"database::${uuid}::name" => $database_name, "database::${uuid}::name" => $database_name,
"database::${uuid}::user" => $database_user, "database::${uuid}::user" => $database_user,
"database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : "#!string!log_0186!#", "database::${uuid}::password" => $anvil->Log->secure ? $anvil->data->{database}{$uuid}{password} : $anvil->Words->string({key => "log_0186"}),
}}); }});
# Loop through the tables in this DB. For each table, we'll record the most recent time # Loop through the tables in this DB. For each table, we'll record the most recent time

@ -125,7 +125,7 @@ sub anvil_version
my $target = defined $parameter->{target} ? $parameter->{target} : "local"; my $target = defined $parameter->{target} ? $parameter->{target} : "local";
my $version = 0; my $version = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
port => $port, port => $port,
remote_user => $remote_user, remote_user => $remote_user,
target => $target, target => $target,
@ -327,7 +327,7 @@ sub cgi
if ((($variable =~ /passwd/) or ($variable =~ /password/)) && (not $anvil->Log->secure)) if ((($variable =~ /passwd/) or ($variable =~ /password/)) && (not $anvil->Log->secure))
{ {
# This is a password and we're not logging sensitive data, obfuscate it. # This is a password and we're not logging sensitive data, obfuscate it.
$censored_value = "#!string!log_0186!#"; $censored_value = $anvil->Words->string({key => "log_0186"});
} }
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 1, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 1, list => {
"cgi::${variable}::$say_value" => $censored_value, "cgi::${variable}::$say_value" => $censored_value,

@ -294,9 +294,9 @@ sub call
# NOTE: The shell call might contain sensitive data, so we show '--' if 'secure' is set and $anvil->Log->secure is not. # NOTE: The shell call might contain sensitive data, so we show '--' if 'secure' is set and $anvil->Log->secure is not.
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $log_level, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $log_level, list => {
'close' => $close, 'close' => $close,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
secure => $secure, secure => $secure,
shell_call => ((not $anvil->Log->secure) && ($secure)) ? "#!string!log_0186!#" : $shell_call, shell_call => ((not $anvil->Log->secure) && ($secure)) ? $anvil->Words->string({key => "log_0186"}) : $shell_call,
ssh_fh => $ssh_fh, ssh_fh => $ssh_fh,
start_time => $start_time, start_time => $start_time,
remote_user => $remote_user, remote_user => $remote_user,
@ -467,7 +467,7 @@ sub call
{ {
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $log_level, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $log_level, list => {
remote_user => $remote_user, remote_user => $remote_user,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
}}); }});
if (not $ssh_fh->auth_password($remote_user, $password)) if (not $ssh_fh->auth_password($remote_user, $password))
{ {

@ -144,7 +144,7 @@ sub backup
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
fatal => $fatal, fatal => $fatal,
port => $port, port => $port,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
target => $target, target => $target,
remote_user => $remote_user, remote_user => $remote_user,
source_file => $source_file, source_file => $source_file,
@ -609,7 +609,7 @@ sub copy_file
my $target = defined $parameter->{target} ? $parameter->{target} : ""; my $target = defined $parameter->{target} ? $parameter->{target} : "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
overwrite => $overwrite, overwrite => $overwrite,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
remote_user => $remote_user, remote_user => $remote_user,
source_file => $source_file, source_file => $source_file,
target_file => $target_file, target_file => $target_file,
@ -904,7 +904,7 @@ sub make_directory
group => $group, group => $group,
mode => $mode, mode => $mode,
port => $port, port => $port,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
remote_user => $remote_user, remote_user => $remote_user,
target => $target, target => $target,
user => $user, user => $user,
@ -1234,7 +1234,7 @@ sub read_file
file => $file, file => $file,
force_read => $force_read, force_read => $force_read,
port => $port, port => $port,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
remote_user => $remote_user, remote_user => $remote_user,
secure => $secure, secure => $secure,
target => $target, target => $target,
@ -1546,7 +1546,7 @@ sub rsync
my $failed = 0; my $failed = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => {
destination => $destination, destination => $destination,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
port => $port, port => $port,
source => $source, source => $source,
switches => $switches, switches => $switches,
@ -1860,11 +1860,11 @@ sub update_config
my $update = 0; my $update = 0;
my $new_file = ""; my $new_file = "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => {
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
port => $port, port => $port,
secure => $secure, secure => $secure,
target => $target, target => $target,
value => ((not $secure) or ($anvil->Log->secure)) ? $value : "#!string!log_0186!#", value => ((not $secure) or ($anvil->Log->secure)) ? $value : $anvil->Words->string({key => "log_0186"}),
variable => $variable, variable => $variable,
remote_user => $remote_user, remote_user => $remote_user,
}}); }});
@ -1901,7 +1901,7 @@ sub update_config
my $is_secure = $this_variable =~ /passw/i ? 1 : 0; my $is_secure = $this_variable =~ /passw/i ? 1 : 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => {
this_variable => $this_variable, this_variable => $this_variable,
this_value => ((not $is_secure) or ($anvil->Log->secure)) ? $this_value : "#!string!log_0186!#", this_value => ((not $is_secure) or ($anvil->Log->secure)) ? $this_value : $anvil->Words->string({key => "log_0186"}),
}}); }});
if ($this_variable eq $variable) if ($this_variable eq $variable)
{ {
@ -2060,7 +2060,7 @@ sub write_file
mode => $mode, mode => $mode,
overwrite => $overwrite, overwrite => $overwrite,
port => $port, port => $port,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
secure => $secure, secure => $secure,
target => $target, target => $target,
user => $user, user => $user,
@ -2326,7 +2326,7 @@ sub _create_rsync_wrapper
my $target = defined $parameter->{target} ? $parameter->{target} : ""; my $target = defined $parameter->{target} ? $parameter->{target} : "";
my $password = defined $parameter->{password} ? $parameter->{password} : ""; my $password = defined $parameter->{password} ? $parameter->{password} : "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, secure => 0, list => {
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
target => $target, target => $target,
}}); }});

@ -251,8 +251,8 @@ sub change_shell_user_password
target => $target, target => $target,
port => $port, port => $port,
remote_user => $remote_user, remote_user => $remote_user,
new_password => $anvil->Log->secure ? $new_password : "#!string!log_0186!#", new_password => $anvil->Log->secure ? $new_password : $anvil->Words->string({key => "log_0186"}),
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
}}); }});
# Do I have a user? # Do I have a user?
@ -1335,7 +1335,7 @@ sub ping
count => $count, count => $count,
fragment => $fragment, fragment => $fragment,
payload => $payload, payload => $payload,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
ping => $ping, ping => $ping,
port => $port, port => $port,
remote_user => $remote_user, remote_user => $remote_user,

@ -297,19 +297,19 @@ sub process_sync_page
foreach my $uuid (keys %{$anvil->data->{database}}) foreach my $uuid (keys %{$anvil->data->{database}})
{ {
next if $uuid eq $host_uuid; next if $uuid eq $host_uuid;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { uuid => $uuid }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { uuid => $uuid }});
my $host = $anvil->data->{database}{$uuid}{host} ? $anvil->data->{database}{$uuid}{host} : ""; # This should fail my $host = $anvil->data->{database}{$uuid}{host} ? $anvil->data->{database}{$uuid}{host} : ""; # This should fail
my $port = $anvil->data->{database}{$uuid}{port} ? $anvil->data->{database}{$uuid}{port} : 5432; my $port = $anvil->data->{database}{$uuid}{port} ? $anvil->data->{database}{$uuid}{port} : 5432;
my $name = $anvil->data->{database}{$uuid}{name} ? $anvil->data->{database}{$uuid}{name} : $anvil->data->{sys}{database}{name}; my $name = $anvil->data->{database}{$uuid}{name} ? $anvil->data->{database}{$uuid}{name} : $anvil->data->{sys}{database}{name};
my $user = $anvil->data->{database}{$uuid}{user} ? $anvil->data->{database}{$uuid}{user} : $anvil->data->{sys}{database}{user}; my $user = $anvil->data->{database}{$uuid}{user} ? $anvil->data->{database}{$uuid}{user} : $anvil->data->{sys}{database}{user};
my $password = $anvil->data->{database}{$uuid}{password} ? $anvil->data->{database}{$uuid}{password} : ""; my $password = $anvil->data->{database}{$uuid}{password} ? $anvil->data->{database}{$uuid}{password} : "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
host => $host, host => $host,
port => $port, port => $port,
name => $name, name => $name,
user => $user, user => $user,
password => $anvil->Log->secure ? $password : "#!string!log_0186!#", password => $anvil->Log->secure ? $password : $anvil->Words->string({key => "log_0186"}),
}}); }});
} }
@ -336,7 +336,7 @@ sub configure_striker
{ {
# Sanity check step1. # Sanity check step1.
my $sane = sanity_check_step1($anvil); my $sane = sanity_check_step1($anvil);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { sane => $sane }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { sane => $sane }});
if ($sane) if ($sane)
{ {
# Step 1 was sane, show step 2. # Step 1 was sane, show step 2.
@ -718,8 +718,10 @@ ORDER BY
### Show the bonded ifaces form. ### Show the bonded ifaces form.
# BCN # BCN
my $bcn_count = $anvil->data->{cgi}{bcn_count}{value} ? $anvil->data->{cgi}{bcn_count}{value} : 1; my $bcn_count = $anvil->data->{cgi}{bcn_count}{value} ? $anvil->data->{cgi}{bcn_count}{value} : 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { bcn_count => $bcn_count }});
foreach my $bcn (1..$bcn_count) foreach my $bcn (1..$bcn_count)
{ {
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { bcn => $bcn }});
push @{$links}, "bcn_link".$bcn; push @{$links}, "bcn_link".$bcn;
my $this_ip_key = "bcn".$bcn."_ip"; my $this_ip_key = "bcn".$bcn."_ip";
my $this_subnet_key = "bcn".$bcn."_subnet"; my $this_subnet_key = "bcn".$bcn."_subnet";
@ -767,8 +769,10 @@ ORDER BY
# IFN # IFN
my $ifn_count = $anvil->data->{cgi}{ifn_count}{value} ? $anvil->data->{cgi}{ifn_count}{value} : 1; my $ifn_count = $anvil->data->{cgi}{ifn_count}{value} ? $anvil->data->{cgi}{ifn_count}{value} : 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { ifn_count => $ifn_count }});
foreach my $ifn (1..$ifn_count) foreach my $ifn (1..$ifn_count)
{ {
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { ifn => $ifn }});
push @{$links}, "ifn_link".$ifn; push @{$links}, "ifn_link".$ifn;
my $this_ip_key = "ifn".$ifn."_ip"; my $this_ip_key = "ifn".$ifn."_ip";
my $this_subnet_key = "ifn".$ifn."_subnet"; my $this_subnet_key = "ifn".$ifn."_subnet";
@ -798,7 +802,7 @@ ORDER BY
}); });
# Assemble the form # Assemble the form
$interface_form .= $anvil->Template->get({file => "main.html", name => "bonded_interface_form", variables => { $interface_form .= $anvil->Template->get({file => "config.html", name => "bonded_interface_form", variables => {
field => $anvil->Words->string({key => "striker_0022", variables => { number => $ifn }}), field => $anvil->Words->string({key => "striker_0022", variables => { number => $ifn }}),
description => "#!string!striker_0023!#", description => "#!string!striker_0023!#",
ip_key => $this_ip_key, ip_key => $this_ip_key,
@ -960,7 +964,7 @@ ORDER BY
id => "striker_user", id => "striker_user",
field => "#!string!striker_0031!#", field => "#!string!striker_0031!#",
description => "#!string!striker_0032!#", description => "#!string!striker_0032!#",
value => defined $anvil->data->{cgi}{striker_user}{value} ? $anvil->data->{cgi}{striker_user}{value} : $anvil->data->{sys}{user}, value => defined $anvil->data->{cgi}{striker_user}{value} ? $anvil->data->{cgi}{striker_user}{value} : $anvil->data->{sys}{user}{name},
default_value => "", default_value => "",
class => $striker_user_class, class => $striker_user_class,
extra => "", extra => "",

@ -220,7 +220,7 @@ sub update_local_passwords
print $anvil->Words->string({key => "message_0026", variables => { user => $user }}); print $anvil->Words->string({key => "message_0026", variables => { user => $user }});
my $query = "ALTER ROLE ".$user." WITH PASSWORD ".$dbh->quote($anvil->data->{switches}{'new-password'}); my $query = "ALTER ROLE ".$user." WITH PASSWORD ".$dbh->quote($anvil->data->{switches}{'new-password'});
$dbh->do($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0090", variables => { $dbh->do($query) or $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0090", variables => {
query => $anvil->Log->secure ? $query : "#!string!log_0186!#", query => $anvil->Log->secure ? $query : $anvil->Words->string({key => "log_0186"}),
server => "localhost", server => "localhost",
db_error => $DBI::errstr, db_error => $DBI::errstr,
}}); }});

@ -258,7 +258,7 @@ sub reconfigure_network
my $link1_mac = $anvil->data->{variables}{form}{config_step2}{$link1_key}{value}; my $link1_mac = $anvil->data->{variables}{form}{config_step2}{$link1_key}{value};
my $link2_mac = defined $anvil->data->{variables}{form}{config_step2}{$link2_key}{value} ? $anvil->data->{variables}{form}{config_step2}{$link2_key}{value} : ""; my $link2_mac = defined $anvil->data->{variables}{form}{config_step2}{$link2_key}{value} ? $anvil->data->{variables}{form}{config_step2}{$link2_key}{value} : "";
my $old_link1_iface = $anvil->data->{sys}{mac}{$link1_mac}{iface} ? $anvil->data->{sys}{mac}{$link1_mac}{iface} : ""; my $old_link1_iface = $anvil->data->{sys}{mac}{$link1_mac}{iface} ? $anvil->data->{sys}{mac}{$link1_mac}{iface} : "";
my $old_link2_iface = $link2_mac ? $anvil->data->{sys}{mac}{$link2_mac}{iface} : ""; my $old_link2_iface = defined $anvil->data->{sys}{mac}{$link2_mac}{iface} ? $anvil->data->{sys}{mac}{$link2_mac}{iface} : "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
ip_key => $ip_key, ip_key => $ip_key,
is_gateway => $is_gateway, is_gateway => $is_gateway,

Loading…
Cancel
Save