You are not logged in.
When my unittest running on Oracle auto-create the TAUTH* tables it creates the PasswordHashHexa field with length 40 (according to the index property in TSQLAuthUser)
But when adding the default users in InitializeTable() the PasswordHashHexa is longer than 40 positions, resulting in the following error:
ORA-12899: value too large for column "OPF_MORMOT"."AUTHUSER"."PASSWORDHASHHEXA" ( actual: 64. maximum 40)
The callstack being:
SynDBOracle.TSQLDBOracleLib.HandleError(-1,$54E30F8,False,sllNone)
SynDBOracle.TSQLDBOracleStatement.FetchTest(-1)
SynDBOracle.TSQLDBOracleStatement.ExecutePrepared
SQLite3DB.TSQLRestServerStaticExternal.ExecuteFromJSON('{"LogonName":"Supervisor","DisplayName":"Supervisor","PasswordHashHexa":"67aeea294e1cb515236fd7829c55ec820ef888e8e221814d24d83b3dc4d825dd","GroupRights":2}',0)
SQLite3DB.TSQLRestServerStaticExternal.EngineAdd(TSQLAuthUser,'{"LogonName":"Supervisor","DisplayName":"Supervisor","PasswordHashHexa":"67aeea294e1cb515236fd7829c55ec820ef888e8e221814d24d83b3dc4d825dd","GroupRights":2}')
SQLite3Commons.TSQLRestServer.Add($2592CC0,True,False)
SQLite3Commons.TSQLAuthGroup.InitializeTable($24E6260,'')
SQLite3.TSQLRestServerDB.CreateMissingTables(0)
Looking at the SHA256DigestToString function, it sets the length to SizeOf(TSHA256Digest) * 2
And TSHA256Digest is an array[0..31] of byte, so the result will be 64 in length
Last edited by Bascy (2012-09-14 06:40:34)
Offline
I've fixed PasswordHashHexa field width.
See http://synopse.info/fossil/info/acb9d3ffef
Thanks for the report.
Offline