Ticket #48965: wp-login.php.patch
File wp-login.php.patch, 2.2 KB (added by , 5 years ago) |
---|
-
wp-login.php
106 106 */ 107 107 if ( 'loggedout' === $wp_error->get_error_code() ) { 108 108 ?> 109 <script>if("sessionStorage" in window){try{for(var key in sessionStorage){if( key.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(key)}}}catch(e){}};</script>109 <script>if("sessionStorage" in window){try{for(var key in sessionStorage){if(-1 !== key.indexOf("wp-autosave-")){sessionStorage.removeItem(key)}}}catch(e){}};</script> 110 110 <?php 111 111 } 112 112 … … 308 308 ?> 309 309 <script type="text/javascript"> 310 310 try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){} 311 if( typeof wpOnload=='function')wpOnload();311 if('function' === typeof wpOnload)wpOnload(); 312 312 </script> 313 313 <?php 314 314 } … … 335 335 function wp_shake_js() { 336 336 ?> 337 337 <script type="text/javascript"> 338 addLoadEvent = function(func){if( typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};338 addLoadEvent = function(func){if("undefined"!==typeof jQuery)jQuery(document).ready(func);else if('function'!==typeof wpOnload){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 339 339 function s(id,pos){g(id).left=pos+'px';} 340 340 function g(id){return document.getElementById(id).style;} 341 341 function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{g(id).position='static';wp_attempt_focus();}catch(e){}}} … … 523 523 $secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) ); 524 524 setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure ); 525 525 526 if ( SITECOOKIEPATH != COOKIEPATH ) {526 if ( SITECOOKIEPATH !== COOKIEPATH ) { 527 527 setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); 528 528 } 529 529 … … 932 932 933 933 $errors = new WP_Error(); 934 934 935 if ( isset( $_POST['pass1'] ) && $_POST['pass1'] != $_POST['pass2'] ) {935 if ( isset( $_POST['pass1'] ) && $_POST['pass1'] !== $_POST['pass2'] ) { 936 936 $errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) ); 937 937 } 938 938