Changeset 2771

Show
Ignore:
Timestamp:
07/14/08 19:58:41 (3 months ago)
Author:
bchoate
Message:

Use app-assigned magic token instead of posted one.

Files:

Legend:

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

    r2692 r2771  
    12151215sub do_reply { 
    12161216    my $app = shift; 
     1217 
     1218    # Save requires POST 
     1219    return $app->error( $app->translate("Invalid request") ) 
     1220      if $app->request_method() ne 'POST'; 
     1221 
    12171222    my $q   = $app->param; 
    12181223 
     
    12551260sub reply_preview { 
    12561261    my $app = shift; 
     1262 
     1263    # Preview requires POST 
     1264    return $app->error( $app->translate("Invalid request") ) 
     1265      if $app->request_method() ne 'POST'; 
     1266 
     1267    $app->validate_magic or return; 
     1268 
    12571269    my $q   = $app->param; 
    12581270    my $cfg = $app->config; 
     
    12601272    my $param = { 
    12611273        reply_to    => $q->param('reply_to'), 
    1262         magic_token => $q->param('magic_token')
     1274        magic_token => $app->current_magic
    12631275        blog_id     => $q->param('blog_id'), 
    12641276    };