Skip to content

Commit 9ec5e6e

Browse files
committed
Swift: Re-organize the RealmStore constructor.
1 parent 424046d commit 9ec5e6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

swift/ql/lib/codeql/swift/security/CleartextStorageDatabaseExtensions.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ private class RealmStore extends CleartextStorageDatabaseSink instanceof DataFlo
6666
// any write into a class derived from `RealmSwiftObject` is a sink. For
6767
// example in `realmObj.data = sensitive` the post-update node corresponding
6868
// with `realmObj.data` is a sink.
69-
exists(NominalType t, Expr e |
70-
t.getUnderlyingType().getABaseType*().getName() = "RealmSwiftObject" and
69+
exists(NominalType t, Type base, Expr e |
70+
base.getName() = "RealmSwiftObject" and
7171
this.getPreUpdateNode().asExpr() = e and
72-
e.getFullyConverted().getType() = t and
72+
e.getFullyConverted().getType().getUnderlyingType().getABaseType*() = base and
7373
not e.(DeclRefExpr).getDecl() instanceof SelfParamDecl
7474
)
7575
}

0 commit comments

Comments
 (0)