Skip to content

Commit 5b38e06

Browse files
committed
Rename ActiveRecordModelClass#methodMayAccessField() as ActiveRecordModelClass#getAPotentialFieldAccessMethod()
1 parent 3bdc680 commit 5b38e06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ql/lib/codeql/ruby/frameworks/ActiveRecord.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ActiveRecordModelClass extends ClassDeclaration {
7171
/**
7272
* Gets methods defined in this class that may access a field from the database.
7373
*/
74-
Method methodMayAccessField() {
74+
Method getAPotentialFieldAccessMethod() {
7575
// It's a method on this class or one of its super classes
7676
result = this.getAllClassDeclarations().getAMethod() and
7777
// There is a value that can be returned by this method which may include field data
@@ -89,7 +89,7 @@ class ActiveRecordModelClass extends ClassDeclaration {
8989
)
9090
or
9191
// ...the called method can access a field
92-
c.getATarget() = cNode.getInstance().getClass().methodMayAccessField()
92+
c.getATarget() = cNode.getInstance().getClass().getAPotentialFieldAccessMethod()
9393
)
9494
)
9595
}
@@ -244,7 +244,7 @@ abstract class ActiveRecordModelInstantiation extends OrmInstantiation::Range,
244244
not exists(this.getClass().getMethod(methodName))
245245
or
246246
// ...the called method can access a field.
247-
exists(Method m | m = this.getClass().methodMayAccessField() |
247+
exists(Method m | m = this.getClass().getAPotentialFieldAccessMethod() |
248248
m.getName() = methodName
249249
)
250250
)

0 commit comments

Comments
 (0)