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
- Download the plugin (see “Download” above).
- 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.
- Activate the Plug-in.
- 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!
15 Comments
Jump to comment form | comment rss [?] | trackback uri [?]