Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r283 r284 1293 1293 ($dom_id) = $dbh->selectrow_array("SELECT domain_id FROM domains WHERE domain=?", undef, ($domain)); 1294 1294 1295 _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group, username => $userinfo{username},1295 _log($dbh, (domain_id => $dom_id, group_id => $group, 1296 1296 entry => "Added ".($state ? 'active' : 'inactive')." domain $domain")); 1297 1297 … … 1308 1308 my @tmp1 = split /:/, $host; 1309 1309 my @tmp2 = split /:/, $val; 1310 _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group, 1311 username => $userinfo{username}, entry => 1312 "[new $domain] Added SOA record [contact $tmp1[0]] [master $tmp1[1]] ". 1310 _log($dbh, (domain_id => $dom_id, group_id => $group, 1311 entry => "[new $domain] Added SOA record [contact $tmp1[0]] [master $tmp1[1]] ". 1313 1312 "[refresh $tmp2[0]] [retry $tmp2[1]] [expire $tmp2[2]] [minttl $tmp2[3]], TTL $ttl")); 1314 1313 } else { … … 1316 1315 $logentry .= " [distance $dist]" if $typemap{$type} eq 'MX'; 1317 1316 $logentry .= " [priority $dist] [weight $weight] [port $port]" if $typemap{$type} eq 'SRV'; 1318 _log($dbh, (domain_id => $dom_id, user_id => $userinfo{id}, group_id => $group, 1319 username => $userinfo{username}, entry => 1320 $logentry." $val', TTL $ttl")); 1317 _log($dbh, (domain_id => $dom_id, group_id => $group, 1318 entry => $logentry." $val', TTL $ttl")); 1321 1319 } 1322 1320 } … … 1329 1327 my $msg = $@; 1330 1328 eval { $dbh->rollback; }; 1329 _log($dbh, (domain_id => $dom_id, group_id => $group, entry => "Failed adding domain $domain ($msg)")) 1330 if $config{log_failures}; 1331 $dbh->commit; # since we enabled transactions earlier 1331 1332 return ('FAIL',$msg); 1332 1333 } else { -
trunk/dns.cgi
r283 r284 389 389 changepage(page => "reclist", id => $msg); 390 390 } else { 391 logaction(0, $session->param("username"), $webvar{group}, "Failed adding domain $webvar{domain} ($msg)")392 if $config{log_failures};393 391 $session->param('add_failed', 1); 394 392 ##fixme: domain a security risk for XSS?
Note:
See TracChangeset
for help on using the changeset viewer.