diff options
Diffstat (limited to 'wp-admin/upload.php')
-rw-r--r-- | wp-admin/upload.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 53d1e56..b2977c7 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -8,6 +8,14 @@ if (!current_user_can('upload_files')) wp_reset_vars(array('action', 'tab', 'from_tab', 'style', 'post_id', 'ID', 'paged', 'post_title', 'post_content', 'delete')); +// IDs should be integers +$ID = (int) $ID; +$post_id = (int) $post_id; + +// Require an ID for the edit screen +if ( $action == 'edit' && !$ID ) + wp_die(__("You are not allowed to be here")); + require_once('upload-functions.php'); if ( !$tab ) $tab = 'browse-all'; |