Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5d275ec4

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 5d275ec4487ded1246a67b626f0b61e2fbcceb16
  • Vorgänger de998cce
  • Nachfolger db1ee56f

Das Session-Timeout konfigurierbar gemacht; Standardwert weiterhin acht Stunden.

Unterschiede anzeigen:

SL/Auth.pm
86 86

  
87 87
  $self->{authenticator}->verify_config();
88 88

  
89
  $self->{session_timeout} *= 1;
90
  $self->{session_timeout}  = 8 * 60 if (!$self->{session_timeout});
91

  
89 92
  $main::lxdebug->leave_sub();
90 93
}
91 94

  
......
423 426
  $form   = $main::form;
424 427

  
425 428
  $dbh    = $self->dbconnect();
426
  $query  = qq|SELECT *, (mtime < (now() - '8h'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
429
  $query  = qq|SELECT *, (mtime < (now() - '$self->{session_timeout}m'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
427 430

  
428 431
  $cookie = selectfirst_hashref_query($form, $dbh, $query, $session_id);
429 432

  
......
477 480
       WHERE session_id IN
478 481
         (SELECT id
479 482
          FROM auth.session
480
          WHERE (mtime < (now() - '8h'::interval)))|;
483
          WHERE (mtime < (now() - '$self->{session_timeout}m'::interval)))|;
481 484

  
482 485
  do_query($main::form, $dbh, $query);
483 486

  
484 487
  $query =
485 488
    qq|DELETE FROM auth.session
486
       WHERE (mtime < (now() - '8h'::interval))|;
489
       WHERE (mtime < (now() - '$self->{session_timeout}m'::interval))|;
487 490

  
488 491
  do_query($main::form, $dbh, $query);
489 492

  

Auch abrufbar als: Unified diff