WordPress.org

Make WordPress Core

Ticket #24193: sleep.patch

File sleep.patch, 601 bytes (added by mpol, 23 months ago)

add a sleep of 3 seconds if the login failed.

  • wp-login.php

    diff -uNr WordPress-old/wp-login.php WordPress/wp-login.php
    old new  
    701701        if ( isset($_POST['log']) ) 
    702702                $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(wp_unslash($_POST['log'])) : ''; 
    703703        $rememberme = ! empty( $_POST['rememberme'] ); 
     704        sleep(3); 
    704705?> 
    705706 
    706707<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">