Code: Select all
ISFSObject tr = new SFSObject();
tr.PutUtfString("version", SmartFoxManager.instance.Version);
tr.PutUtfString("gamePlayer", SmartFoxManager.instance.gamePlayer);
tr.PutUtfString("gameVersion", SmartFoxManager.versionNumber);
tr.PutUtfString("gameName", SmartFoxManager.nameGame);
tr.PutUtfString("upass", SmartFoxManager.instance.password);
smartFox.Send(new LoginRequest(SmartFoxManager.instance.email, SmartFoxManager.instance.password, SmartFoxManager.zone, tr));
then on the server i print the values I receive, they 2 consecutives calls to the loginrequest will generate different encripted passwords.
To prove it, I added this code on the server side custom login:
Code: Select all
nick = (String) event.getParameter(SFSEventParam.LOGIN_NAME);
pass = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD);
trace("LOGIN " + nick);
version = obj.getUtfString("version");
trace("VERSION " + version);
String unencripted=obj.getUtfString("upass");
trace("UPASS["+unencripted+"] PASS " + pass);
same input should produce the same output right? no in here... everything matches except for the encripted password, check out the resulting log:
First call:
03 Apr 2011 15:37:49,552 INFO [pool-1-thread-2] Extensions - {dogfightEx}: LOGIN jsjjj@jdkd.com
03 Apr 2011 15:37:49,552 INFO [pool-1-thread-2] Extensions - {dogfightEx}: VERSION 1.4a
03 Apr 2011 15:37:49,552 INFO [pool-1-thread-2] Extensions - {dogfightEx}: UPASS[kaka] PASS 1043a422f0b64a3190dff43d7e188ed5
Second call, pay attention to the PASS at the end, and compare it to the UPASS (the original password, which is the same):
03 Apr 2011 15:38:35,854 INFO [pool-1-thread-2] Extensions - {dogfightEx}: LOGIN jsjjj@jdkd.com
03 Apr 2011 15:38:35,861 INFO [pool-1-thread-2] Extensions - {dogfightEx}: VERSION 1.4a
03 Apr 2011 15:38:35,861 INFO [pool-1-thread-2] Extensions - {dogfightEx}: UPASS[kaka] PASS 5d599dbee19353c3d26fb5cf2d4f3569
Same UPASS, different PASS...
Am I doing something wrong? is this a bug or we've found the first quantum computer in history?