Trim Passwords

Purpose

This WordPress plugin trims the passwords to eliminate accidentally entered ( usually during copy/paste) spaces and other characters (tabs and double quotation marks like this one: ).

Why? – Because some users out there cannot copy well. The condition is common and is well illustrated here.

Seriously, there are real people who got shaky hands due to their old age, physical exertion, excessive use of recreational substances ( = too much coffee), or just the plain excitement of seeing your blog.

They would try to copy their password and then paste it into your login form, but would capture a few extra characters around the password, and WordPress will dutifully accept these extras, process them as a part of the password, and spit out “wrong password” error, confusing the hell out of the users (they know the password is right, since they just copied it)!

And then they will blame you.

This WordPress plugin takes care of the problem.

What it does, how it works

All you have to do is install the plugin. There is nothing to configure.

Once installed, it will automatically trim spaces, tabs, and double quotation marks at the beginning and the end of user passwords.

Trimming is performed:

  • when user logs in
  • when user’s password is changed (in the admin menu).

Beware!

If you have users with existing passwords that start/end with the characters trimmed by this plugin, they will NOT be able to log in. Since WordPress stores all passwords as an MD5 hash, there is no way to run some sort of a batch job and trim the existing passwords. Granted, such passwords are rare, and the standard password reset process will take care of this little inconvenience.

Disclaimer

I wrote “Trim Passwords” for my own purposes, not for public distribution. It is provided “As Is” and can probably do horrible harm.

I do not know PHP. I have never written a full PHP program in my life. Not even “Hello, World”. This means the code may be buggy and is guaranteed to be sub-optimal.

If it works fine for you, please leave a comment here – it will encourage me and other potential users. Oh, and if you can make it better – go for it!

Good luck!

Download

Have you read the Disclaimer above??? – download Trim Passwords here: Trim Passwords plugin for WordPress, Version 0.9

Installation

  1. Download the plugin (see “Download” above).
  2. Rename trim-passwords.txt to trim-passwords.php and put it into your plugins directory (/wp-content/plugins/) or in a sub directory of the plugins directory.
  3. Activate the Plug-in.
  4. Enjoy!

Thank you

Writing all this up took time and effort. If you happen to be actually using this plug-in – I appreciate your vote of confidence and would love to hear about it!



  1. Thank you!
    Nice plugin addiction to mine, hope they’ll work (you scared me with disclaimer, but I’ll dare :-).
    Just collecting plugins around now for my new wp website, I’ll let you know if they work (if I remember to come back).

    For now, just wanted to drop a note to encourage you, yes go ahead man, nice ideas and good job!!

  2. Thanks, Tom!

    You got me encouraged. I think I will be releasing some more of my old plugins in a couple of days – just need to package them. You get the credit for the inspiration!
    :-)

  3. I have just installed your plugin on a new blog I am doing and first – thank you!

  4. সহডে

  5. Nice Plugin :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


About

I am sorry you have to see this. Actually, I am not – if you came here, it’s you fault. When we choose our actions we also choose the consequences.

Despite my oversized ego I do NOT believe that anyone out there craves a daily dose of my insight. In fact, I am suspicious of people who think otherwise.

This blog is a tool.

I meddle with many complex computer deployments, and as I go through adding features and learning things, I also tend to forget numerous details and the reasoning behind the many choices I have made in the past. This is the place to document my adventures. And to give something back.

If you stumble upon this and find it useful – …good for you.


Follow

Get every new post delivered to your Inbox.

Join 249 other followers

%d bloggers like this: