X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/341dfbb66f24f5145174c373267f889c31615cc5..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/press-this.php diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index f368b213..0f2be6c5 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -13,7 +13,7 @@ require_once('./admin.php'); header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); -if ( ! current_user_can('edit_posts') ) +if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) wp_die( __( 'Cheatin’ uh?' ) ); /** @@ -91,11 +91,11 @@ if ( isset($_REQUEST['action']) && 'post' == $_REQUEST['action'] ) { } // Set Variables -$title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( stripslashes( $_GET['t'] ) , ENT_QUOTES) ) ) : ''; +$title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( wp_unslash( $_GET['t'] ) , ENT_QUOTES) ) ) : ''; $selection = ''; if ( !empty($_GET['s']) ) { - $selection = str_replace(''', "'", stripslashes($_GET['s'])); + $selection = str_replace(''', "'", wp_unslash($_GET['s'])); $selection = trim( htmlspecialchars( html_entity_decode($selection, ENT_QUOTES) ) ); } @@ -110,7 +110,7 @@ $image = isset($_GET['i']) ? $_GET['i'] : ''; if ( !empty($_REQUEST['ajax']) ) { switch ($_REQUEST['ajax']) { case 'video': ?> - @@ -314,20 +313,6 @@ var photostorage = false; do_action('admin_print_scripts'); do_action('admin_head'); ?> - - + +
@@ -486,7 +466,7 @@ var photostorage = false; echo '

'; submit_button( __( 'Submit for Review' ), 'primary', 'review', false ); } ?> - +

@@ -605,7 +585,7 @@ var photostorage = false;
- + @@ -619,7 +599,7 @@ var photostorage = false; $content = ''; if ( $selection ) - $content .= $selection; + $content .= $selection; if ( $url ) { $content .= '

';