close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Why password is stored in session ?

Thread began 1/30/2010 9:50 pm by prashant_vrce399814 | Last modified 2/01/2010 2:15 pm by Eric Mittman | 1091 views | 1 replies |

prashant_vrce399814

Why password is stored in session ?

I just purchased this product and immediately found one thing which draw my attention

1. In Admin/user_LogIn.php , I found the following

if((((isset($_POST["userName"]) && $_POST["userName"]==$WAGLOBAL_Admin_UserName)?$_POST["userName"]:"") != "")) {
$_SESSION["AdminLogin"] = "".((isset($_POST["Password"]))?$_POST["Password"]:"") ."";
}


Why the Admin Password ( which is very critical ) need to be stored in session ? This is something indeed very unusual in Web development where security is a concern. Storing passwords in cookie or session is a very poor coding standard and possess a great security hole.

Can any body explain why this is done ? Or am I missing something ?

Also once I login after a successful reigstration, when I access the login page through browser, the default behaviour should be ( Since I already logged in ) to display me the success page url or something like that. But instead I again see I am prompted for login. This is also not an expected behaviour of an website from user's prospective.

Care to explain ?

Sign in to reply to this post

Eric Mittman

The password for accessing the admin portion of the site is held in the globals file. The value that you enter for the password when logging into the admin area is held in a session variable. The variable is then compared against the value in the globals file. This is only for the admin area, any users that register to the site will not have their passwords stored in a session variable.

As far as I understand this would still be fairly secure as someone would need access to the php server in order to exploit this. If someone had access to the site they could just open the globals file to see the values.

After logging into the admin area you should be returned to the index page. This is controlled with the code on the users_Login page in the admin area on line 11. You can update this to be any page you need.

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...