Skip to content

Commit 2871686

Browse files
committed
Ruby: getAction -> getAnAction
1 parent 246ad46 commit 2871686

File tree

1 file changed

+9
-9
lines changed
  • ruby/ql/lib/codeql/ruby/frameworks/actioncontroller

1 file changed

+9
-9
lines changed

ruby/ql/lib/codeql/ruby/frameworks/actioncontroller/Filters.qll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module Filters {
5353
/**
5454
* Gets an action which this filter is applied to.
5555
*/
56-
ActionControllerActionMethod getAction() {
56+
ActionControllerActionMethod getAnAction() {
5757
// A filter cannot apply to another filter
5858
result != any(Filter f).getFilterCallable() and
5959
// Only include routable actions. This can exclude valid actions if we can't parse the `routes.rb` file fully.
@@ -212,8 +212,8 @@ module Filters {
212212
other.getKind() = this.getKind() and
213213
not this.skipped(action) and
214214
not other.skipped(action) and
215-
action = this.getAction() and
216-
action = other.getAction() and
215+
action = this.getAnAction() and
216+
action = other.getAnAction() and
217217
(
218218
not this.isPrepended() and
219219
(
@@ -286,7 +286,7 @@ module Filters {
286286

287287
Callable getFilterCallable() { result = call.getFilterCallable(this.getFilterName()) }
288288

289-
ActionControllerActionMethod getAction() { result = call.getAction() }
289+
ActionControllerActionMethod getAnAction() { result = call.getAnAction() }
290290
}
291291

292292
private class BeforeFilter extends Filter {
@@ -318,7 +318,7 @@ module Filters {
318318

319319
Callable getFilterCallable() { result = call.getFilterCallable(this.getFilterName()) }
320320

321-
ActionControllerActionMethod getAction() { result = call.getAction() }
321+
ActionControllerActionMethod getAnAction() { result = call.getAnAction() }
322322

323323
predicate registeredBefore(StringlikeLiteralCfgNode other) {
324324
(other instanceof SkipFilter or other instanceof Filter) and
@@ -327,8 +327,8 @@ module Filters {
327327

328328
Filter getSkippedFilter(ActionControllerActionMethod action) {
329329
not result instanceof SkipFilter and
330-
action = this.getAction() and
331-
action = result.getAction() and
330+
action = this.getAnAction() and
331+
action = result.getAnAction() and
332332
result.getFilterCallable() = this.getFilterCallable()
333333
}
334334
}
@@ -386,13 +386,13 @@ module Filters {
386386
// Final before filter
387387
not exists(f.getNextFilter(action)) and
388388
not f.skipped(action) and
389-
action = f.getAction() and
389+
action = f.getAnAction() and
390390
succ = action
391391
)
392392
or
393393
exists(AfterFilter f |
394394
// First after filter
395-
action = f.getAction() and
395+
action = f.getAnAction() and
396396
not f.skipped(action) and
397397
pred = action and
398398
succ = f.getFilterCallable() and

0 commit comments

Comments
 (0)