From 13091129161e5ee59622ccf04523b39c88560faf Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 15 Aug 2006 21:07:13 +0000 Subject: [PATCH] Update action after generating a new nonce to reduce race condition window. git-svn-id: https://develop.svn.wordpress.org/trunk@4098 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/autosave.js.php | 3 +-- wp-includes/script-loader.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php index cb73ebfff9..2c78f4e31f 100644 --- a/wp-includes/js/autosave.js.php +++ b/wp-includes/js/autosave.js.php @@ -41,7 +41,6 @@ function autosave_update_post_ID() { message = "" + autosave_cur_time(); $('post_ID').name = "post_ID"; $('post_ID').value = res; - $('hiddenaction').value = 'editpost'; // We need new nonces nonceAjax = new sack(); nonceAjax.element = null; @@ -53,7 +52,7 @@ function autosave_update_post_ID() { nonceAjax.onCompletion = autosave_update_nonce; nonceAjax.method = "POST"; nonceAjax.runAJAX(); - + $('hiddenaction').value = 'editpost'; } $('autosave').innerHTML = message; } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 2c677e4036..56c44cbc01 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -18,7 +18,7 @@ class WP_Scripts { $this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '08112006' ); $this->add( 'wp_tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('tiny_mce'), '04162006' ); $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0'); - $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4086'); + $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4096'); if ( is_admin() ) { $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); $this->add( 'listman', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one