Subversion Repositories PEEPS

Rev

Rev 2 | Rev 4 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 3
Line 357... Line 357...
357
    my $PEEPSAUTH_cookie = CGI::Cookie->new(-name=>'PEEPSAUTH',-value=>$authenticated->{cookie_string});
357
    my $PEEPSAUTH_cookie = CGI::Cookie->new(-name=>'PEEPSAUTH',-value=>$authenticated->{cookie_string});
358
    my $PEEPSMFA_cookie = $FORM{saveMFA} ?
358
    my $PEEPSMFA_cookie = $FORM{saveMFA} ?
359
      CGI::Cookie->new(-name=>'PEEPS_MFA_UUID',-value=>$authenticated->{MFA_UUID},-expires=>'+5y') :
359
      CGI::Cookie->new(-name=>'PEEPS_MFA_UUID',-value=>$authenticated->{MFA_UUID},-expires=>'+5y') :
360
      CGI::Cookie->new(-name=>'PEEPS_MFA_UUID',-value=>$authenticated->{MFA_UUID});
360
      CGI::Cookie->new(-name=>'PEEPS_MFA_UUID',-value=>$authenticated->{MFA_UUID});
Line -... Line 361...
-
 
361
    
361
    
362
    $ENV{HTTPS} = 'ON';
362
    my $destination = url ();
363
    my $destination = url ();
363
    print header(-cookie=>[$PEEPSAUTH_cookie, $PEEPSMFA_cookie]);
364
    print header(-cookie=>[$PEEPSAUTH_cookie, $PEEPSMFA_cookie]);
364
    printRCHeader("MFA Confirmed", $destination);
365
    printRCHeader("MFA Confirmed", $destination);
365
    print<<goforth;
366
    print<<goforth;
Line 824... Line 825...
824
  my $PAGE_TITLE = shift;
825
  my $PAGE_TITLE = shift;
825
  my $redirect = shift // "";
826
  my $redirect = shift // "";
826
# use CGI qw/start_html/;
827
# use CGI qw/start_html/;
827
  use HTML::Tiny;
828
  use HTML::Tiny;
828
  my $h = HTML::Tiny->new( mode => 'html' );
829
  my $h = HTML::Tiny->new( mode => 'html' );
-
 
830
  $ENV{HTTPS} = 'ON';
Line 829... Line 831...
829
  
831
  
830
#  my $logout = $h->a ({ href=>"index", onClick=>"document.cookie = 'PEEPSAUTH=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';return true;" }, "[Log Out]");
832
#  my $logout = $h->a ({ href=>"index", onClick=>"document.cookie = 'PEEPSAUTH=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';return true;" }, "[Log Out]");
831
  my $referrer = param ("referrer") ? param ("referrer") : $ENV{HTTP_REFERER};
833
  my $referrer = param ("referrer") ? param ("referrer") : $ENV{HTTP_REFERER};
832
  my $logout = (!$referrer or $referrer eq url) ? "" : $h->button ({ onClick=>"window.location.href='$referrer';" }, "Back")."&nbsp;";
834
  my $logout = (!$referrer or $referrer eq url) ? "" : $h->button ({ onClick=>"window.location.href='$referrer';" }, "Back")."&nbsp;";
Line 1323... Line 1325...
1323
  
1325
  
1324
  my $random_six_digit_number = 100000 + int(rand(900000));
1326
  my $random_six_digit_number = 100000 + int(rand(900000));
1325
  my $string_number = sprintf ("%06d", $random_six_digit_number);
1327
  my $string_number = sprintf ("%06d", $random_six_digit_number);
Line -... Line 1328...
-
 
1328
  $dbh->do ("update authentication set mfa = ?, mfa_timestamp = now() where person_id = ?", undef, $string_number, $user->{person_id});
1326
  $dbh->do ("update authentication set mfa = ?, mfa_timestamp = now() where person_id = ?", undef, $string_number, $user->{person_id});
1329
  
1327
  
1330
  $ENV{HTTPS} = 'ON';
1328
  $body .= $h->p ($string_number);
1331
  $body .= $h->p ($string_number);
Line 1329... Line 1332...
1329
  $body .= $h->p ("Or click ".$h->a ({ href => url ()."?authenticate=".$string_number }, "this link"));
1332
  $body .= $h->p ("Or click ".$h->a ({ href => url ()."?authenticate=".$string_number }, "this link"));
Line 1344... Line 1347...
1344
  my $email = $data->{email};
1347
  my $email = $data->{email};
1345
  my $subject = 'WFTDI PEEPS - New User';
1348
  my $subject = 'WFTDI PEEPS - New User';
1346
  my $body;
1349
  my $body;
1347
  if ($context eq "New User") {
1350
  if ($context eq "New User") {
1348
    $subject .= " Request";
1351
    $subject .= " Request";
-
 
1352
    $ENV{HTTPS} = 'ON';
1349
    my $activationlink = url ()."?activate=".$data->{activation};
1353
    my $activationlink = url ()."?activate=".$data->{activation};
1350
    $body = $h->p ("Greetings,");
1354
    $body = $h->p ("Greetings,");
1351
    $body .= $h->p ("It appears as though you've registered a new account in WFTDI's PEEPS system with the following information:");
1355
    $body .= $h->p ("It appears as though you've registered a new account in WFTDI's PEEPS system with the following information:");
1352
    $body .= $h->table ([
1356
    $body .= $h->table ([
1353
      $h->tr ([$h->td ("&nbsp;&nbsp;", "Derby Name:",    $data->{derby_name})]),
1357
      $h->tr ([$h->td ("&nbsp;&nbsp;", "Derby Name:",    $data->{derby_name})]),