Make WordPress Core

Changeset 24208 for trunk/wp-login.php


Ignore:
Timestamp:
05/08/2013 10:45:58 PM (12 years ago)
Author:
azaozz
Message:

Logged out warnings:

  • Don't use <base> tag to set target="_blank". It can break form submission. Instead, set target only on links with JS.
  • Fix same domain comparison in wp_auth_check_html() when FORCE_SSL_LOGIN == true.
  • Properly show/hide the "Close" button when the dialog is shown multiple times.

See #23295

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r24207 r24208  
    101101        ?>
    102102        <style type="text/css">html{background-color: transparent;}</style>
    103         <base target="_blank">
    104103        <?php
    105104
     
    664663        $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."));
    665664
    666     $form_target = '';
    667665    if ( $interim_login ) {
    668         $form_target = ' target="_self"';
    669666        if ( ! $errors->get_error_code() )
    670667            $errors->add('expired', __('Session expired. Please log in again. You will not move away from this page.'), 'message');
     
    698695?>
    699696
    700 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"<?php echo $form_target; ?>>
     697<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    701698    <p>
    702699        <label for="user_login"><?php _e('Username') ?><br />
     
    758755<?php } ?>
    759756if(typeof wpOnload=='function')wpOnload();
     757<?php if ( $interim_login ) { ?>
     758(function(){
     759try {
     760    var i, links = document.getElementsByTagName('a');
     761    for ( i in links ) {
     762        if ( links[i].href )
     763            links[i].target = '_blank';
     764    }
     765} catch(e){}
     766}());
     767<?php } ?>
    760768</script>
    761769
Note: See TracChangeset for help on using the changeset viewer.