Apache-DnsZone

 view release on metacpan or  search on metacpan

lib/Apache/DnsZone.pm  view on Meta::CPAN

1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
# check dom_id
my $dom_id = apr()->param('dom_id');
($dom_id) = ($dom_id =~ /(\d+)/)[0];
if ($dom_id !~ /^\d+$/) {
    $r->log_reason("User didn't supply a domain id for this request or tried to fake it");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# is uid owner of dom_id
my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
    $r->log_reason("User trying to hijack another domain");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# check for record_id & type
unless (apr()->param('type')) {
    $r->log_reason("No type specified for edit");
    output_redirect($r, 1, '/admin');

lib/Apache/DnsZone.pm  view on Meta::CPAN

1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
# check dom_id
my $dom_id = apr()->param('dom_id');
($dom_id) = ($dom_id =~ /(\d+)/)[0];
if ($dom_id !~ /^\d+$/) {
    $r->log_reason("User didn't supply a domain id for this request or tried to fake it");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# is uid owner of dom_id
my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
    $r->log_reason("User trying to hijack another domain");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# check for record_id & type
unless (apr()->param('type')) {
    $r->log_reason("No type specified for edit");
    output_redirect($r, 1, '/admin');

lib/Apache/DnsZone.pm  view on Meta::CPAN

2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
# check dom_id
my $dom_id = apr()->param('dom_id');
($dom_id) = ($dom_id =~ /(\d+)/)[0];
if ($dom_id !~ /^\d+$/) {
    $r->log_reason("User didn't supply a domain id for this request or tried to fake it");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# is uid owner of dom_id
my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
    $r->log_reason("User trying to hijack another domain");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# check for record_id & type
unless (apr()->param('type')) {
    $r->log_reason("No type specified for edit");
    output_redirect($r, 1, '/admin');

lib/Apache/DnsZone.pm  view on Meta::CPAN

3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
# check dom_id
my $dom_id = apr()->param('dom_id');
($dom_id) = ($dom_id =~ /(\d+)/)[0];
if ($dom_id !~ /^\d+$/) {
    $r->log_reason("User didn't supply a domain id for this request or tried to fake it");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
# is uid owner of dom_id
my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
    $r->log_reason("User trying to hijack another domain");
    output_redirect($r, 1, '/admin');
    $dbh->close();
    return REDIRECT;
}
 
# actually it should be pretty safe to go on now!
 
my $tpl = new CGI::FastTemplate($cfg->{'cfg'}->{DnsZoneTemplateDir});



( run in 0.554 second using v1.01-cache-2.11-cpan-49f99fa48dc )