close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Password improvements in powercms

Thread begun 3/18/2012 9:30 am by johnlanglois | Last modified 3/23/2012 12:17 pm by Jason Byrnes | 1758 views | 3 replies |

johnlanglois

Password improvements in powercms

I am uncomfortable with having the client passwords stored in the powercms table in an unencrypted fashion.

What would I need to do to change these to SHA1?
Which login files will need updating.
Are there other authentication moments that could be impacted?

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

This is not a supported modification to power CMS.

you would need to edit the super admin password stored wa_setings table to the SHA1 string.

you would need to edit the admin_cms/users_login.php, add the following code at line 1 to convert the password that is entered to an SHA1 string for login:

php:
<?php

if(isset($_POST["Password"])){
    
$_POST["Password"] = sha1($_POST["Password"]);
}
?>




similar code would need to be added to the admin_cms/users_insert.php pages as well so that new users that are created will have the password stored in SHA1 format. the password form element on that page is named "password" so the code above would need to be altered slightly.

and code would need to be added to the users_update.php page to compare the submitted password with the one stored in the database to see if it is being changed and if so, convert the new password to the SHA1 format.


If you need assistance making this change, we can help you in a premiere support appointment.

Sign in to reply to this post

johnlanglois

Originally Said By: Jason Byrnes
  This is not a supported modification to power CMS.

you would need to edit the super admin password stored wa_setings table to the SHA1 string.

you would need to edit the admin_cms/users_login.php, add the following code at line 1 to convert the password that is entered to an SHA1 string for login:
php:
<?php

if(isset($_POST["Password"])){
    
$_POST["Password"] = sha1($_POST["Password"]);
}
?>



similar code would need to be added to the admin_cms/users_insert.php pages as well so that new users that are created will have the password stored in SHA1 format. the password form element on that page is named "password" so the code above would need to be altered slightly.

and code would need to be added to the users_update.php page to compare the submitted password with the one stored in the database to see if it is being changed and if so, convert the new password to the SHA1 format.


If you need assistance making this change, we can help you in a premiere support appointment.  



Thank you for the assistance.

Just out of curiosity, the Security Assist tutorials were excellent in showing how to do encryption on passwords. So, it's obvious WebAssist understands how to do that.
Why would you do anything less in powercms?

And why would you not include a user name field when so many people are conditioned to expect one? I get a lot of phone calls from clients because they confuse the email field of the login screen with a user name field.

Sign in to reply to this post

Jason ByrnesWebAssist

the standard security assist pages don't use encryption, Power CMS login was created using the standard security assist authentication.

While encryption can be added, in most cases it is a false security. encrypting the password in the database will only prevent someone from accessing the database directly and reading the passwords, the likely hood of that happening is quite small.

or likely way for a hacker to harvest passwords is to use packet sniffing where they are copying the data packets being sent from the client browser to the PHP server.

the way the login works with encryption is this:
* On the login page, the user enters the email address and password, then click the submit button

*When the login page submits, it sends the plain user name and plain password to the server:
email: test@test.com
password: test123

* The server collects the posts information, and converts the password string to the sha1 equivalent:
test123 = 7288edd0fc3ffcbe93a0cf06e3568e28521687bc

* it then looks up the email / pass combo in the database:
SELECT * FROM users WHERE emailAddress = 'test@test.com' AND password = '7288edd0fc3ffcbe93a0cf06e3568e28521687bc'

when the form post is sent to the server, a hacker could harvest that data packet and retrieve the password regardless of whether it is stored in an encrypted format in the database.

The way to prevent that is put your registration and login pages behind an SSL Certificate, this is why i say that encrypted passwords offer a false sense of security, it's really only one part of the larger security puzzle.

There really is no standard on login using a User Name versus Email, most social media sites use an Email Address as the login. Personally, I prefer using an Email address because it is something that the user is more likely to remember, using a username means one more piece of information to remember for login

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...