TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-22-2008, 10:44 AM   #1 (permalink)
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default Desktop icon to pass login?

Hi,

Is it possible so what when a user logs into their account they have the option to download a desktop icon which is unique to their account and will allow them the double click that icon and pass through the login process of the website and open them directly into their account?

If that is possible, how would i go about doing that?

Thanks for any help,
Michael.
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote
Old 02-22-2008, 10:52 AM   #2 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

For windows you'd probably have to create a shortcut to your site that contains a hash ID unique to the user.
TlcAndres is offline  
Reply With Quote
Old 02-22-2008, 11:23 AM   #3 (permalink)
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default

logmein.com have it so you can drag the icon from their page to your computer and it has the icon image and links to your account. I could add a more complex unique ID to each account and use that but its the process of the user clicking a button and an icon appearing on their desktop linking to a set address that im not sure how to do...

Thanks
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote
Old 02-22-2008, 02:26 PM   #4 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

I agree with TlcAndres; at the very least you'd have to hash the password value tacked onto the GET string. I'd recommend against doing this altogether, for me it doesn't do much in adding value to the user, and takes security down a notch or two.

Why not simply log them in once, and give them a 'remember me' cookie that holds a token logging them in at a later date? Most PHP applications (this forum being one of them) does this.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 02-22-2008, 05:51 PM   #5 (permalink)
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default

Sorry to ask a stupid question but can you explain "hash the password"?
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote
Old 02-22-2008, 07:52 PM   #6 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

It is the norm to store the value of the hash of the password rather than a cleartext password. You don't want to just store '123pass' or something in your database as-is. So it is common to 'hash' the password value using MD5, SHA1, or any number of other common hash methods, and instead store the hash value. When you check the database against the user's password, you check it against the hash value, not the actual input value. That value would be consider safer to send along in a GET string than a plaintext password. Not perfect, but safer.

Try this:
PHP Code:
$password'123pass';

echo 
"The MD5 hash value of '{$password}' is: " .md5($password) .'<br />';
echo 
"The SHA1 hash value of '{$password}' is: " .sha1($password) .'<br />'
Play around with that a bit, substitute '123pass' with any number of real passwords you might use, experiment with different hash functions. Make sure you check the string length of each hash output as well. For example, MD5 is always a 32 char base 16 (hex) value. SHA1, similarly, is always a 40 char base 16 (hex) value. Other hashes produce longer (or shorter, but you don't want to bother with them) values. It is usually a safe bet that the longer the hash value, the better it is. When designing your database, define the column length to be a CHAR(32) or CHAR(40), etc. to fit that size hash value.

You can also use a 'salt' combined with a hash to make it even more secure. Every password you store in the database, for example, might be 'salted' prior to storage and checking.
PHP Code:
$password'123pass';
// the salt - uniform for all passwords stored
$salt'YeScurvyDogs';
// return the value
$hashedPasswordmd5$salt $password); 
See what we're doing there? We're using the salt concatenated to the password value to make it even more secure. So the hashed value doesn't match the plain hash of md5($password). It may be complex at first, but play around with it and see how it works. I typically store the salt in a database field that is retrieved prior to every hash, so it actually stays in the database and not in the script.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 02-22-2008, 08:45 PM   #7 (permalink)
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
Kalle is on a distinguished road
Default

You'll need to create a Windows application or a shortcut with some sort of validation hash. My best suggestion would be to make a Windows application for that.
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 02-22-2008, 09:55 PM   #8 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

To extend on what I said a .url file with the following would suit your purposes

Quote:
[InternetShortcut]
URL=http://site.com/?hash=somethingextremelylongherethatisn'tlikelytob eguessed
have a the hash checked against the database and thats it, I would recommend hashing the some bit of data that isn't known to the user or any other person for that matter. For instance if you happen to store the last known login time for non-user related purposes (Like logs) then hash that and store it within the .url, even then a hacker who got into your database would not even need to go through the rainbow table process to crack the user's account, they'd simply copy the hash value into their own .url file and click to login and theirs not verification you can add to check others because asking for their real name, then it's right there the database records. Asking for a question to answer to verify would defeat the purpose of the .url file.

So in essence, what I am trying to say is - Don't do it.
TlcAndres is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:00 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design