Make WordPress Core

Changeset 7376


Ignore:
Timestamp:
03/18/2008 04:59:54 AM (19 years ago)
Author:
ryan
Message:

More nonce renewals from andy. fixes #6266

Location:
trunk
Files:
2 edited

Legend:

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

    r7375 r7376  
    521521                wp_set_post_lock( $id );
    522522
    523         if ( $nonce_age == 2 )
     523        if ( $nonce_age == 2 ) {
    524524                $supplemental['replace-autosavenonce'] = wp_create_nonce('autosave');
     525                $supplemental['replace-getpermalinknonce'] = wp_create_nonce('getpermalink');
     526                $supplemental['replace-samplepermalinknonce'] = wp_create_nonce('samplepermalink');
     527                $supplemental['replace-closedpostboxesnonce'] = wp_create_nonce('closedpostboxes');
     528                if ( $id ) {
     529                        if ( $_POST['post_type'] == 'post' )
     530                                $supplemental['replace-_wpnonce'] = wp_create_nonce('update-post_' . $id);
     531                        elseif ( $_POST['post_type'] == 'page' )
     532                                $supplemental['replace-_wpnonce'] = wp_create_nonce('update-page_' . $id);
     533                }
     534        }
    525535
    526536        $x = new WP_Ajax_Response( array(
  • trunk/wp-includes/pluggable.php

    r7375 r7376  
    954954 */
    955955function wp_nonce_tick() {
    956         $nonce_life = apply_filters('nonce_life', 86400) / 2;
     956        $nonce_life = apply_filters('nonce_life', 86400);
    957957
    958958        return ceil(time() / ( $nonce_life / 2 ));
Note: See TracChangeset for help on using the changeset viewer.