Re:Foursquare iPhone app sends passwords in plain text, don'...
by bitanarch on Sunday August 22, 2010 @03:30AM
(#1624359)
Yes, that's basically the way to do it. If you're doing it on a mobile phone you can even add HMAC (via SHA-1 or SHA-2, MD5 is still ok for that but we all know it's possible to produce MD5 collisions now) on that token when you're talking on HTTP. That way, all messages on the network will be at least authenticated.
The IP checking bit is probably not a good idea. A mobile phone user can be switching between 3G and a public Wifi hotspot as he goes. It can negatively affect user experience.
Re:Foursquare iPhone app sends passwords in plain text, don'...
by k0ban on Monday September 06, 2010 @05:11AM
(#1666300)
I agree don't use IP as a part of token - it will require user to re-authenticate very often.
And don't forget about the salt. Store password something like SHA-1(MD5(password)+password)
Re:Foursquare iPhone app sends passwords in plain text, don'...
by jacoblyles on Sunday August 22, 2010 @12:15AM
(#1624205)
Do cell phones keep the same IP address for any significant period of time?
Additionally, keeping a user's clear text password in a local datastore is usually a 'bad idea'. At least store the MD5 or SHA-2 of the password (MD5 is considered insecure now though) and then pass the hash along to auth the user before giving them a token.