<!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>[24179] trunk: Logged out warnings:</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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/24179">24179</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2013-05-06 21:35:50 +0000 (Mon, 06 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Logged out warnings:
- Don't remove login error messages coming from wp_signon().
- When the login form is shown in iframe, open all links in a new tab/window.
- Add filter for the login form error message.
See <a href="http://core.trac.wordpress.org/ticket/23295">#23295</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesjswpauthcheckjs">trunk/wp-includes/js/wp-auth-check.js</a></li>
<li><a href="#trunkwploginphp">trunk/wp-login.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesjswpauthcheckjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/wp-auth-check.js (24178 => 24179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/wp-auth-check.js    2013-05-06 09:49:13 UTC (rev 24178)
+++ trunk/wp-includes/js/wp-auth-check.js       2013-05-06 21:35:50 UTC (rev 24179)
</span><span class="lines">@@ -11,8 +11,7 @@
</span><span class="cx">                          e.originalEvent.returnValue = window.authcheckL10n.beforeunload;
</span><span class="cx">                  });
</span><span class="cx"> 
</span><del>-                       // Add 'sandbox' for browsers that support it, only restrict access to the top window.
-                       frame = $('<iframe id="wp-auth-check-frame" sandbox="allow-same-origin allow-forms allow-scripts" frameborder="0">').attr( 'title', noframe.text() );
</del><ins>+                        frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
</ins><span class="cx">                   frame.load( function(e) {
</span><span class="cx">                          var height, body;
</span><span class="cx"> 
</span><span class="lines">@@ -25,6 +24,7 @@
</span><span class="cx">                                  wrap.addClass('fallback');
</span><span class="cx">                                  form.remove();
</span><span class="cx">                                  noframe.focus();
</span><ins>+                                       return;
</ins><span class="cx">                           }
</span><span class="cx"> 
</span><span class="cx">                          if ( height ) {
</span></span></pre></div>
<a id="trunkwploginphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-login.php (24178 => 24179)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-login.php       2013-05-06 09:49:13 UTC (rev 24178)
+++ trunk/wp-login.php  2013-05-06 21:35:50 UTC (rev 24179)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">          $wp_error = new WP_Error();
</span><span class="cx"> 
</span><span class="cx">  // Shake it!
</span><del>-       $shake_error_codes = array( 'interim_login_error', 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
</del><ins>+        $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
</ins><span class="cx">   $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
</span><span class="cx"> 
</span><span class="cx">  if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
</span><span class="lines">@@ -97,11 +97,10 @@
</span><span class="cx">  if ( is_rtl() )
</span><span class="cx">          $classes[] = 'rtl';
</span><span class="cx">  if ( $interim_login ) {
</span><del>-               // Don't allow interim logins to navigate away from the page.
-               $login_header_url = '#';
</del><span class="cx">           $classes[] = 'interim-login';
</span><span class="cx">          ?>
</span><span class="cx">          <style type="text/css">html{background-color: transparent;}</style>
</span><ins>+               <base target="_blank">
</ins><span class="cx">           <?php
</span><span class="cx"> 
</span><span class="cx">          if ( 'success' ===  $interim_login )
</span><span class="lines">@@ -404,6 +403,8 @@
</span><span class="cx"> do_action( 'login_form_' . $action );
</span><span class="cx"> 
</span><span class="cx"> $http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
</span><ins>+$interim_login = isset($_REQUEST['interim-login']);
+
</ins><span class="cx"> switch ($action) {
</span><span class="cx"> 
</span><span class="cx"> case 'postpass' :
</span><span class="lines">@@ -590,7 +591,6 @@
</span><span class="cx"> case 'login' :
</span><span class="cx"> default:
</span><span class="cx">  $secure_cookie = '';
</span><del>-       $interim_login = isset($_REQUEST['interim-login']);
</del><span class="cx">   $customize_login = isset( $_REQUEST['customize-login'] );
</span><span class="cx">  if ( $customize_login )
</span><span class="cx">          wp_enqueue_script( 'customize-base' );
</span><span class="lines">@@ -663,19 +663,11 @@
</span><span class="cx">  if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
</span><span class="cx">          $errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
</span><span class="cx"> 
</span><del>-       // Clear most errors if interim login
</del><ins>+        $form_target = '';
</ins><span class="cx">   if ( $interim_login ) {
</span><del>-               $error_code = $errors->get_error_code();
-               $errors = new WP_Error();
-
-               if ( $error_code ) {
-                       if ( in_array( $error_code, array( 'empty_password', 'empty_username', 'invalid_username', 'incorrect_password' ) ) )
-                               $errors->add('interim_login_error', __('<strong>ERROR</strong>: Invalid username or password.'));
-                       else
-                               $errors->add('interim_login_error_other', sprintf( __( '<strong>ERROR</strong>: Please contact the site administrator or try to <a href="%s" target="_blank">log in from a new window</a>.' ), wp_login_url() ) );
-               } else {
</del><ins>+                $form_target = ' target="_self"';
+               if ( ! $errors->get_error_code() )
</ins><span class="cx">                   $errors->add('expired', __('Session expired. Please log in again. You will not move away from this page.'), 'message');
</span><del>-               }
</del><span class="cx">   } else {
</span><span class="cx">          // Some parts of this script use the main login form to display a message
</span><span class="cx">          if              ( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
</span><span class="lines">@@ -692,6 +684,8 @@
</span><span class="cx">                  $errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to experience the awesomeness.' ), 'message' );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
+
</ins><span class="cx">   // Clear any stale cookies.
</span><span class="cx">  if ( $reauth )
</span><span class="cx">          wp_clear_auth_cookie();
</span><span class="lines">@@ -703,7 +697,7 @@
</span><span class="cx">  $rememberme = ! empty( $_POST['rememberme'] );
</span><span class="cx"> ?>
</span><span class="cx"> 
</span><del>-<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
</del><ins>+<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"<?php echo $form_target; ?>>
</ins><span class="cx">   <p>
</span><span class="cx">          <label for="user_login"><?php _e('Username') ?><br />
</span><span class="cx">          <input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
</span></span></pre>
</div>
</div>

</body>
</html>