- Timestamp:
- 04/18/12 17:30:41 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r308 r310 228 228 # Snag ACL/permissions here too 229 229 230 # my $sth = $dbh->prepare("SELECT user_id,group_id,password,firstname,lastname FROM users WHERE username=?");231 # $sth->execute($webvar{username});232 #233 # if (my ($uid,$gid,$pass,$fname,$lname) = $sth->fetchrow_array) {234 # $webvar{password} = '' if !$webvar{password};235 #236 # if ($pass =~ m|^\$1\$([A-Za-z0-9/.]+)\$|) {237 # # native passwords (crypt-md5)238 # $webvar{loginfailed} = 1 if $pass ne unix_md5_crypt($webvar{password},$1);239 # } elsif ($pass =~ /^[0-9a-f]{32}$/) {240 # # VegaDNS import (hex-coded MD5)241 # $webvar{loginfailed} = 1 if $pass ne md5_hex($webvar{password});242 # } else {243 # # plaintext (convenient now and then)244 # $webvar{loginfailed} = 1 if $pass ne $webvar{password};245 # }246 247 230 my $userdata = login($dbh, $webvar{username}, $webvar{password}); 248 231 … … 313 296 $page->param(loginfailed => 1) if $webvar{loginfailed}; 314 297 $page->param(sessexpired => 1) if $webvar{sessexpired}; 315 # $page->param(orgname => $config{orgname}) if $config{orgname} ne 'Example Corp';316 298 $page->param(version => $DNSDB::VERSION); 317 299 … … 355 337 unless ($permissions{admin} || $permissions{domain_create}); 356 338 357 fill_grouplist("grouplist"); 339 $webvar{group} = $curgroup if !$webvar{group}; 340 fill_grouplist("grouplist", $webvar{group}); 358 341 359 342 if ($session->param('add_failed')) { … … 363 346 $session->clear('errmsg'); 364 347 $page->param(domain => $webvar{domain}); 348 $page->param(addinactive => $webvar{makeactive} eq 'n'); 365 349 } 366 350 … … 391 375 $session->param('add_failed', 1); 392 376 ##fixme: domain a security risk for XSS? 393 ##fixme: keep active/inactive state, group selection 394 changepage(page => "newdomain", domain => $webvar{domain}, errmsg => $msg);377 changepage(page => "newdomain", domain => $webvar{domain}, errmsg => $msg, 378 makeactive => ($webvar{makeactive} ? 'y' : 'n'), group => $webvar{group}); 395 379 } 396 380 -
trunk/templates/newdomain.tmpl
r205 r310 30 30 </tr> 31 31 <tr class="datalinelight"> 32 <td>Make domain active on next DNS propagation</td><td><input type="checkbox" name="makeactive" checked="checked"/></td>32 <td>Make domain active on next DNS propagation</td><td><input type="checkbox" name="makeactive"<TMPL_UNLESS addinactive> checked="checked"</TMPL_UNLESS> /></td> 33 33 </tr> 34 34 <tr><td colspan="2" class="tblsubmit"><input type="submit" value="Add domain" /></td></tr>
Note:
See TracChangeset
for help on using the changeset viewer.