Changeset 641


Ignore:
Timestamp:
06/06/14 16:57:46 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix another subtle session bug; if a user disabled *themself*, then used
the Back button somewhere along the line, they could continue to browse.
It's not clear if some aspect of this could be abused to view data without
ever having been logged in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r640 r641  
    9797        or die CGI::Session->errstr();
    9898
    99 if (!$sid || $session->is_expired) {
     99if (!$sid || $session->is_expired || !$session->param('uid') || !$dnsdb->userStatus($session->param('uid')) ) {
    100100  $webvar{page} = 'login';
    101101} else {
     
    12341234        ($permissions{self_edit} && $webvar{id} == $session->param('uid')) )) {
    12351235      my $stat = $dnsdb->userStatus($webvar{id}, $webvar{userstatus});
     1236      # kick user out if user disabled self
     1237      # arguably there should be a more specific error message for this case
     1238      changepage(page=> 'login', sessexpired => 1) if $webvar{id} == $session->param('uid');
    12361239      $page->param(resultmsg => $DNSDB::resultstr);
    12371240    } else {
Note: See TracChangeset for help on using the changeset viewer.