added pseudorandom generator

This commit is contained in:
Gani Georgiev
2022-11-06 15:26:34 +02:00
parent 46dc6cc47c
commit 4cddb6b5cb
9 changed files with 89 additions and 47 deletions
+2 -2
View File
@@ -193,7 +193,7 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
currentCollectionName = collection.Name
currentTableAlias = "__auth_" + inflector.Columnify(currentCollectionName)
authIdParamKey := "auth" + security.RandomString(5)
authIdParamKey := "auth" + security.PseudoRandomString(5)
authIdParams := dbx.Params{authIdParamKey: authRecordId}
// ---
@@ -354,7 +354,7 @@ func (r *RecordFieldResolver) resolveStaticRequestField(path ...string) (resultN
resultVal = val
}
placeholder := "f" + security.RandomString(7)
placeholder := "f" + security.PseudoRandomString(5)
name := fmt.Sprintf("{:%s}", placeholder)
params := dbx.Params{placeholder: resultVal}