Support » Plugin: Restrict Usernames Emails Characters » Disabled trim of blank space in username at login page

  • Resolved hemligg

    (@hemligg)


    We activated this plugin in order to prevent users from creating usernames with . and @. And it seemed to work fine, but within an hour we received several cases where users were lockout due to too many login attempts.
    We then discovered that the users locked out where trying to log on with a blank space at the end of their email address. For example they tried to log on with ‘test@mail.com ‘ instead of ‘test@mail.com’. They have never had this problem before. So this issue started when we activated this plugin.

    So something changed in the acceptance at the login page when we activited this plugin. This is causing too much trouble for too many users so we had to inactivate the plugin again. 🙁

    Unless this is changed we can’t use this plugin and I recommend anyone planning to use this plugin to be aware of this issue.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Benaceur

    (@benaceur)

    Thanks for spotting this bug.
    until the next update, replace this function:

    function ben_wp_strip_all_tags($string, $remove_breaks = false) {
    		$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
    		$string = strip_tags($string);
    		
    		if ( $remove_breaks )
    		$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
    		
    		return $string;
    		}

    by this:

    function ben_wp_strip_all_tags($string, $remove_breaks = false) {
    		$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
    		$string = strip_tags($string);
    		
    		if ( $remove_breaks )
    		$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
    		
    		return trim($string);
    		}

    in this file:
    wp-content\plugins\restrict-usernames-emails-characters\restrict-usernames-emails-characters.php

    • This reply was modified 5 months, 3 weeks ago by Benaceur.
    Plugin Author Benaceur

    (@benaceur)

    the problem is solved in the latest version of the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.