Skip to content

Commit 68ad5b7

Browse files
Restrict logic for checking for id parameters on index expressions for performance
1 parent 6d704be commit 68ad5b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import csharp
44
import semmle.code.csharp.dataflow.flowsources.Remote
5-
import DataFlow as DF
65
import TaintTracking as TT
76
import ActionMethods
87

@@ -26,7 +25,7 @@ private predicate hasIdParameter(ActionMethod m) {
2625
exists(StringLiteral idStr, IndexerCall idx |
2726
idStr.getValue().toLowerCase().matches(["%id", "%idx"]) and
2827
TT::localTaint(src, DataFlow::exprNode(idx.getQualifier())) and
29-
DF::localExprFlow(idStr, idx.getArgument(0))
28+
idStr = idx.getArgument(0)
3029
)
3130
)
3231
}

0 commit comments

Comments
 (0)