Changeset 2827

Show
Ignore:
Timestamp:
07/22/08 00:00:43 (4 months ago)
Author:
bchoate
Message:

Restored invalidate_commenter_session to clear legacy comment cookies. BugId:80744

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-41/lib/MT/App.pm

    r2822 r2827  
    11991199    my $sess_obj = MT::Session->load({id => $session }); 
    12001200    $sess_obj->remove() if ($sess_obj); 
    1201  
    1202     $app->logout(); 
    1203  
    1204     # need to clear commenter_name for writeCommenterGreeting 
     1201     
     1202    my $timeout = $app->{cfg}->CommentSessionTimeout; 
     1203 
     1204    my %kookee = (-name => COMMENTER_COOKIE_NAME(), 
     1205                  -value => '', 
     1206                  -path => '/', 
     1207                  -expires => "+${timeout}s"); 
     1208    $app->bake_cookie(%kookee); 
    12051209    my %name_kookee = (-name => 'commenter_name', 
    12061210                       -value => '', 
    12071211                       -path => '/', 
    1208                        -expires => "Thu, 01-Jan-70 00:00:01 GMT"); 
     1212                       -expires => "+${timeout}s"); 
    12091213    $app->bake_cookie(%name_kookee); 
    1210     my %kookee = (-name => COMMENTER_COOKIE_NAME()
    1211                   -value => '', 
    1212                   -path => '/', 
    1213                   -expires => "Thu, 01-Jan-70 00:00:01 GMT"); 
    1214     $app->bake_cookie(%kookee); 
     1214    my %id_kookee = (-name => 'commenter_id'
     1215                       -value => '', 
     1216                       -path => '/', 
     1217                       -expires => "+${timeout}s"); 
     1218    $app->bake_cookie(%id_kookee); 
    12151219} 
    12161220 
     
    16331637 
    16341638    MT::Auth->invalidate_credentials({ app => $app }); 
    1635     # my %cookies = $app->cookies(); 
    1636     # $app->_invalidate_commenter_session(\%cookies); 
     1639    my %cookies = $app->cookies(); 
     1640    $app->_invalidate_commenter_session(\%cookies); 
    16371641 
    16381642    # The login box should only be displayed in the event of non-delegated auth