X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..11be15bd505d66a91e2c80062190b13e315a04a9:/wp-login.php
diff --git a/wp-login.php b/wp-login.php
index 239e4a9c..532ffd97 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -65,7 +65,16 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
wp_admin_css( 'colors-fresh', true );
if ( wp_is_mobile() ) { ?>
- get_error_code() ) {
+ ?>
+
+
+
+
@@ -248,7 +264,7 @@ function retrieve_password() {
$message = apply_filters('retrieve_password_message', $message, $key);
if ( $message && !wp_mail($user_email, $title, $message) )
- wp_die( __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function...') );
+ wp_die( __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function.') );
return true;
}
@@ -338,7 +354,7 @@ function register_new_user( $user_login, $user_email ) {
$user_pass = wp_generate_password( 12, false);
$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
if ( ! $user_id ) {
- $errors->add( 'registerfail', sprintf( __( 'ERROR: Couldn’t register you... please contact the webmaster !' ), get_option( 'admin_email' ) ) );
+ $errors->add( 'registerfail', sprintf( __( 'ERROR: Couldn’t register you… please contact the webmaster !' ), get_option( 'admin_email' ) ) );
return $errors;
}
@@ -386,17 +402,16 @@ do_action( 'login_init' );
do_action( 'login_form_' . $action );
$http_post = ('POST' == $_SERVER['REQUEST_METHOD']);
+$interim_login = isset($_REQUEST['interim-login']);
+
switch ($action) {
case 'postpass' :
- if ( empty( $wp_hasher ) ) {
- require_once( ABSPATH . 'wp-includes/class-phpass.php' );
- // By default, use the portable hash from phpass
- $wp_hasher = new PasswordHash(8, true);
- }
+ require_once ABSPATH . 'wp-includes/class-phpass.php';
+ $hasher = new PasswordHash( 8, true );
// 10 days
- setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( stripslashes( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
+ setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
wp_safe_redirect( wp_get_referer() );
exit();
@@ -431,7 +446,7 @@ case 'retrievepassword' :
do_action('lost_password');
login_header(__('Lost Password'), '' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '
', $errors);
- $user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : '';
+ $user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : '';
?>
@@ -448,7 +463,7 @@ case 'retrievepassword' :
- |
+ | %s', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?>
@@ -485,7 +500,7 @@ case 'rp' :
login_header(__('Reset Password'), '' . __('Enter your new password below.') . '
', $errors );
?>
-
-
+
-
-
- |
-
-
-
+
+
+ %s', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> |
+
+
@@ -738,6 +751,17 @@ d.select();
wp_attempt_focus();
if(typeof wpOnload=='function')wpOnload();
+
+(function(){
+try {
+ var i, links = document.getElementsByTagName('a');
+ for ( i in links ) {
+ if ( links[i].href )
+ links[i].target = '_blank';
+ }
+} catch(e){}
+}());
+