Is checkSecurePassword broken?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
jz87
Posts: 19
Joined: 16 Dec 2010, 23:10
Location: us

Is checkSecurePassword broken?

Post by jz87 »

I'm using getApi().checkSecurePassword to verify user passwords but let's say the password is 2, but I type in 4 as the password. checkSecurePassword returns true anyway. Is this a known issue?

For reference I'm using
(ISession)event.getParameter(SFSEventParam.SESSION)
to get the session info.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

We are not aware of any problem with checkSecurePassword, it has been working without problems so far.

Also your example is incorrect because the secure password must be used in the server side login handler in order to check the hashed password coming from the client side.

Make sure to check our tutorials, I am sure it will solve your problem:
http://docs2x.smartfoxserver.com/Develo ... ustomLogin
Lapo
--
gotoAndPlay()
...addicted to flash games
heisemoshengren
Posts: 1
Joined: 20 Apr 2011, 03:12

a custom login broblem!

Post by heisemoshengren »

Lapo wrote:We are not aware of any problem with checkSecurePassword, it has been working without problems so far.

Also your example is incorrect because the secure password must be used in the server side login handler in order to check the hashed password coming from the client side.

Make sure to check our tutorials, I am sure it will solve your problem:
http://docs2x.smartfoxserver.com/Develo ... ustomLogin
getApi().checkSecurePassword(session, dbPassword, password);
all false?
always check failed!
password is ok!
'trace'output to console!
password same!
why?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Please read this post: http://forums.smartfoxserver.com/viewtopic.php?t=10918
(the forum search function can be very helpful :))
Paolo Bax
The SmartFoxServer Team
Post Reply