mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Add some nonce checks to the uploaders. Props duck_. For 3.1.
git-svn-id: https://develop.svn.wordpress.org/branches/3.1@17569 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
306f975eef
commit
1815de3619
@ -499,6 +499,7 @@ function media_upload_image() {
|
|||||||
$id = 0;
|
$id = 0;
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||||
unset($_FILES);
|
unset($_FILES);
|
||||||
@ -604,6 +605,7 @@ function media_upload_audio() {
|
|||||||
$id = 0;
|
$id = 0;
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||||
unset($_FILES);
|
unset($_FILES);
|
||||||
@ -662,6 +664,7 @@ function media_upload_video() {
|
|||||||
$id = 0;
|
$id = 0;
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||||
unset($_FILES);
|
unset($_FILES);
|
||||||
@ -720,6 +723,7 @@ function media_upload_file() {
|
|||||||
$id = 0;
|
$id = 0;
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||||
unset($_FILES);
|
unset($_FILES);
|
||||||
|
@ -38,6 +38,7 @@ if ( isset($_GET['inline']) ) {
|
|||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||||
|
check_admin_referer('media-form');
|
||||||
// Upload File button was clicked
|
// Upload File button was clicked
|
||||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||||
unset($_FILES);
|
unset($_FILES);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user