Swift: Remove assumption that 'username' is not sensitive (in the tests).

This commit is contained in:
Geoffrey White
2023-05-12 11:37:38 +01:00
parent dba951111a
commit e59d7e0345

View File

@@ -30,11 +30,11 @@ class MyRealmSwiftObject : RealmSwiftObject {
class MyRealmSwiftObject2 : Object {
override init() { password = "" }
var username: String?
var harmless: String?
var password: String?
}
func test1(realm : Realm, myUsername: String, myPassword : String, myHashedPassword : String) {
func test1(realm : Realm, myHarmless: String, myPassword : String, myHashedPassword : String) {
// add objects (within a transaction) ...
let a = MyRealmSwiftObject()
@@ -69,7 +69,7 @@ func test1(realm : Realm, myUsername: String, myPassword : String, myHashedPassw
// MyRealmSwiftObject2...
let h = MyRealmSwiftObject2()
h.username = myUsername // GOOD (not sensitive)
h.harmless = myHarmless // GOOD (not sensitive)
h.password = myPassword // BAD
realm.add(h)
}