<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[30356] trunk/src: Switch to a `403` response code in places where it is more appropriate than a `500` due to permissions errors.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/30356">30356</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/30356","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-11-16 06:15:29 +0000 (Sun, 16 Nov 2014)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Switch to a `403` response code in places where it is more appropriate than a `500` due to permissions errors.
Fixes <a href="https://core.trac.wordpress.org/ticket/10551">#10551</a>
Props nacin</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincustomheaderphp">trunk/src/wp-admin/custom-header.php</a></li>
<li><a href="#trunksrcwpadmincustomizephp">trunk/src/wp-admin/customize.php</a></li>
<li><a href="#trunksrcwpadmineditcommentsphp">trunk/src/wp-admin/edit-comments.php</a></li>
<li><a href="#trunksrcwpadminedittagsphp">trunk/src/wp-admin/edit-tags.php</a></li>
<li><a href="#trunksrcwpadmineditphp">trunk/src/wp-admin/edit.php</a></li>
<li><a href="#trunksrcwpadminincludesbookmarkphp">trunk/src/wp-admin/includes/bookmark.php</a></li>
<li><a href="#trunksrcwpadminmediauploadphp">trunk/src/wp-admin/media-upload.php</a></li>
<li><a href="#trunksrcwpadminnavmenusphp">trunk/src/wp-admin/nav-menus.php</a></li>
<li><a href="#trunksrcwpadminnetworksiteusersphp">trunk/src/wp-admin/network/site-users.php</a></li>
<li><a href="#trunksrcwpadminoptionsphp">trunk/src/wp-admin/options.php</a></li>
<li><a href="#trunksrcwpadminpostnewphp">trunk/src/wp-admin/post-new.php</a></li>
<li><a href="#trunksrcwpadminpressthisphp">trunk/src/wp-admin/press-this.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpadminusernewphp">trunk/src/wp-admin/user-new.php</a></li>
<li><a href="#trunksrcwpadminusersphp">trunk/src/wp-admin/users.php</a></li>
<li><a href="#trunksrcwpadminwidgetsphp">trunk/src/wp-admin/widgets.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincustomheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/custom-header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/custom-header.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/custom-header.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -739,7 +739,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function step_2() {
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = absint( $_GET['file'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -890,10 +890,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'custom-header-crop-image' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $_POST['oitar'] > 1 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
</span></span></pre></div>
<a id="trunksrcwpadmincustomizephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/customize.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/customize.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/customize.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/admin.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'customize' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_reset_vars( array( 'url', 'return' ) );
</span></span></pre></div>
<a id="trunksrcwpadmineditcommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-comments.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/edit-comments.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,7 +9,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** WordPress Administration Bootstrap */
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/admin.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can('edit_posts') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_list_table = _get_list_table('WP_Comments_List_Table');
</span><span class="cx" style="display: block; padding: 0 10px"> $pagenum = $wp_list_table->get_pagenum();
</span></span></pre></div>
<a id="trunksrcwpadminedittagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit-tags.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/edit-tags.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,7 +18,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_die( __( 'Invalid taxonomy' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( $tax->cap->manage_terms ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_list_table = _get_list_table('WP_Terms_List_Table');
</span><span class="cx" style="display: block; padding: 0 10px"> $pagenum = $wp_list_table->get_pagenum();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,7 +47,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( $tax->cap->edit_terms ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
</span><span class="cx" style="display: block; padding: 0 10px"> $location = 'edit-tags.php?taxonomy=' . $taxonomy;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'delete-tag_' . $tag_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( $tax->cap->delete_terms ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_delete_term( $tag_ID, $taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,7 +95,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'bulk-tags' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( $tax->cap->delete_terms ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tags = (array) $_REQUEST['delete_tags'];
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $tags as $tag_ID ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,7 +133,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'update-tag_' . $tag_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( $tax->cap->edit_terms ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tag = get_term( $tag_ID, $taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $tag )
</span></span></pre></div>
<a id="trunksrcwpadmineditphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/edit.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/edit.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/edit.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_die( __( 'Invalid post type' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_list_table = _get_list_table('WP_Posts_List_Table');
</span><span class="cx" style="display: block; padding: 0 10px"> $pagenum = $wp_list_table->get_pagenum();
</span></span></pre></div>
<a id="trunksrcwpadminincludesbookmarkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/bookmark.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/bookmark.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/includes/bookmark.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +27,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function edit_link( $link_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( 'manage_links' ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $_POST['link_url'] = esc_html( $_POST['link_url'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $_POST['link_url'] = esc_url($_POST['link_url']);
</span></span></pre></div>
<a id="trunksrcwpadminmediauploadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/media-upload.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/media-upload.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/media-upload.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,10 +32,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Require an ID for the edit screen.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset($action) && $action == 'edit' && !$ID )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Upload type: image, video, file, ..?
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset($_GET['type']) ) {
</span></span></pre></div>
<a id="trunksrcwpadminnavmenusphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/nav-menus.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/nav-menus.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +20,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Permissions Check
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can('edit_theme_options') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'nav-menu' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminnetworksiteusersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/network/site-users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-users.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/network/site-users.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,7 +133,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the user doesn't already belong to the blog, bail.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !is_user_member_of_blog( $user_id ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_userdata( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $user->set_role( $_REQUEST['new_role'] );
</span></span></pre></div>
<a id="trunksrcwpadminoptionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/options.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/options.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/options.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,7 +45,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can( $capability ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Handle admin email change requests
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,7 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && !is_super_admin() && 'update' != $action )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $whitelist_options = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string', 'WPLANG' ),
</span></span></pre></div>
<a id="trunksrcwpadminpostnewphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/post-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/post-new.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/post-new.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +48,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $editing = true;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Schedule auto-draft cleanup
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
</span></span></pre></div>
<a id="trunksrcwpadminpressthisphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/press-this.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/press-this.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/press-this.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,7 +14,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Press It form handler.
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/themes.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,14 +10,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/admin.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'activate' == $_GET['action'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer('switch-theme_' . $_GET['stylesheet']);
</span><span class="cx" style="display: block; padding: 0 10px"> $theme = wp_get_theme( $_GET['stylesheet'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $theme->exists() || ! $theme->is_allowed() )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> switch_theme( $theme->get_stylesheet() );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_redirect( admin_url('themes.php?activated=true') );
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer('delete-theme_' . $_GET['stylesheet']);
</span><span class="cx" style="display: block; padding: 0 10px"> $theme = wp_get_theme( $_GET['stylesheet'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !current_user_can('delete_themes') || ! $theme->exists() )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> delete_theme($_GET['stylesheet']);
</span><span class="cx" style="display: block; padding: 0 10px"> wp_redirect( admin_url('themes.php?deleted=true') );
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span></span></pre></div>
<a id="trunksrcwpadminusernewphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/user-new.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-new.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/user-new.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,9 +11,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! current_user_can( 'create_users' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,7 +55,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can('promote_user', $user_details->ID) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Adding an existing user to this blog
</span><span class="cx" style="display: block; padding: 0 10px"> $new_user_email = $user_details->user_email;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,7 +92,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'create-user', '_wpnonce_create-user' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can('create_users') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $user_id = edit_user();
</span></span></pre></div>
<a id="trunksrcwpadminusersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/users.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/users.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,7 +10,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once( dirname( __FILE__ ) . '/admin.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'list_users' ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_list_table = _get_list_table('WP_Users_List_Table');
</span><span class="cx" style="display: block; padding: 0 10px"> $pagenum = $wp_list_table->get_pagenum();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -128,7 +128,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the user doesn't already belong to the blog, bail.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && !is_user_member_of_blog( $id ) )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die(__('Cheatin’ uh?'));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_userdata( $id );
</span><span class="cx" style="display: block; padding: 0 10px"> $user->set_role($_REQUEST['new_role']);
</span></span></pre></div>
<a id="trunksrcwpadminwidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/widgets.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-admin/widgets.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once(ABSPATH . 'wp-admin/includes/widgets.php');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can('edit_theme_options') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( __( 'Cheatin’ uh?' ));
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( __( 'Cheatin’ uh?' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $widgets_access = get_user_setting( 'widgets_access' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset($_GET['widgets-access']) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2014-11-16 06:10:58 UTC (rev 30355)
+++ trunk/src/wp-includes/functions.php 2014-11-16 06:15:29 UTC (rev 30356)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2312,7 +2312,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $action The nonce action.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_nonce_ays( $action ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $title = __( 'WordPress Failure Notice' );
</del><span class="cx" style="display: block; padding: 0 10px"> if ( 'log-out' == $action ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2323,7 +2322,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_die( $html, $title, array('response' => 403) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_die( $html, __( 'WordPress Failure Notice' ), 403 );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre>
</div>
</div>
</body>
</html>