Changeset 503 for branches/htmlform/cgi-bin/main.cgi
- Timestamp:
- 09/26/11 18:05:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/main.cgi
r497 r503 82 82 83 83 #main() 84 my $aclerr; 84 85 85 86 if(!defined($webvar{action})) { … … 98 99 } elsif ($webvar{action} eq 'addmaster') { 99 100 if ($IPDBacl{$authuser} !~ /a/) { 100 printError("You shouldn't have been able to get here. Access denied.");101 $aclerr = 'addmaster'; 101 102 } 102 103 } elsif ($webvar{action} eq 'newmaster') { 103 104 104 105 if ($IPDBacl{$authuser} !~ /a/) { 105 printError("You shouldn't have been able to get here. Access denied.");106 $aclerr = 'addmaster'; 106 107 } else { 107 108 my $cidr = new NetAddr::IP $webvar{cidr}; … … 191 192 192 193 194 # Switch to a different template if we've tripped on an ACL error. 195 # Note that this should only be exercised in development, when 196 # deeplinked, or when being attacked; normal ACL handling should 197 # remove the links a user is not allowed to click on. 198 if ($aclerr) { 199 $page = HTML::Template->new(filename => "aclerror.tmpl"); 200 $page->param(ipdbfunc => $aclmsg{$aclerr}); 201 } 202 193 203 194 204 # Clean up IPDB globals, DB handle, etc. … … 502 512 503 513 if ($IPDBacl{$authuser} !~ /a/) { 504 printError("You shouldn't have been able to get here. Access denied.");514 $aclerr = 'addblock'; 505 515 return; 506 516 } … … 605 615 sub confirmAssign { 606 616 if ($IPDBacl{$authuser} !~ /a/) { 607 printError("You shouldn't have been able to get here. Access denied.");617 $aclerr = 'addblock'; 608 618 return; 609 619 } … … 777 787 sub insertAssign { 778 788 if ($IPDBacl{$authuser} !~ /a/) { 779 printError("You shouldn't have been able to get here. Access denied.");789 $aclerr = 'addblock'; 780 790 return; 781 791 } … … 1021 1031 sub update { 1022 1032 if ($IPDBacl{$authuser} !~ /c/) { 1023 printError("You shouldn't have been able to get here. Access denied.");1033 $aclerr = 'updateblock'; 1024 1034 return; 1025 1035 } … … 1125 1135 sub remove { 1126 1136 if ($IPDBacl{$authuser} !~ /d/) { 1127 printError("You shouldn't have been able to get here. Access denied.");1137 $aclerr = 'delblock'; 1128 1138 return; 1129 1139 } … … 1210 1220 sub finalDelete { 1211 1221 if ($IPDBacl{$authuser} !~ /d/) { 1212 $ page->param(aclerr => 1);1222 $aclerr = 'delblock'; 1213 1223 return; 1214 1224 }
Note:
See TracChangeset
for help on using the changeset viewer.