Make WordPress Core


Ignore:
Timestamp:
03/18/2008 02:43:20 AM (18 years ago)
Author:
ryan
Message:

Renew autosave nonce. Props andy. fixes #6266

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r7352 r7375  
    461461    break;
    462462case 'autosave' : // The name of this action is hardcoded in edit_post()
    463     check_ajax_referer( 'autosave', 'autosavenonce' );
     463    $nonce_age = check_ajax_referer( 'autosave', 'autosavenonce');
    464464    global $current_user;
    465465
     
    520520    if ( $do_lock && $id && is_numeric($id) )
    521521        wp_set_post_lock( $id );
     522
     523    if ( $nonce_age == 2 )
     524        $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave');
    522525
    523526    $x = new WP_Ajax_Response( array(
Note: See TracChangeset for help on using the changeset viewer.