You are not logged in.
Pages: 1
I have a strange problem with setUser and my client application (with the old versions of the franework I didn't have this problem).
When my client use setUser this return always FALSE. To test it I have check the hash password generate from password user and the hash password inside the database. The strings are the same!
Besides if I try to retrieve user data from the database with my server application and then save it again (without edit them only load the data and the save it), my client can use setUser without problem and with the same parameters.
Any ideas?
Offline
No, in fact after setUser give me a FALSE result if I call a MessageDlg with the SHA256('salt'+Password), the result of SHA256 is the same string saved on database (I can see with the db editor).
So (on my server) I have load the data of my client user and the resave it. If I check the database I see the same string for the password however now the setUser of client return TRUE.
From my test setUser return FALSE at line:
if i=0 then
exit; // expect SessionID+HexaSessionPrivateKey
of setUser function on SQLite3Commons.pas.
Any ideas?
Offline
I do not think it is about the password itself, but something wrong with your DB access may be.
How did you create the User table? Did you try with a plain DB?
On the server side, put a debugger point in TSQLRestServer.Auth method.
Then see when the code exit with an error in this method.
For instance, is User.fID=0 after User := TSQLAuthUser.Create(self,'LogonName=:("%"):',[aUserName]) ?
Offline
Hi,
I have make a test. I have run server application in debug mode (under delphi) then I have run the client application on another computer.
Before load and save the client user data on server application, if my client try to use setUser I have a exception on server application about line 16411 of SynCommons.pas:
function SortDynArrayAnsiString(const A,B): integer;
begin
result := StrComp(PUTF8Char(A),PUTF8Char(B));
end;
and the TSQLRestServer.Auth method is not call.
After load and save the client user data from server application then client can use seyUser without problem, the server application don't have exception and TSQLRestServer.Auth is call without problem.
On my database the users data are saved on AuthGroup and AuthUser table create by framework.
If I try to create a new database seems to work, but I need use my old database and I don't understand why it doesn't work.
Can you help me?
Offline
Pages: 1