mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
Support when a property is specified by a string literal instead of a nameof expression
In earlier versions of the Razor generator, a string literal was used instead of a `nameof` expression in order to indicate the name of the property being modified. This means we need to look up the property by name instead of using a more explicit access.
This commit is contained in:
committed by
Tamas Vajk
parent
342d4a6982
commit
52b889f008
@@ -159,7 +159,13 @@ private module JumpNodes {
|
||||
*/
|
||||
Property getParameterProperty() {
|
||||
result.getAnAttribute() instanceof MicrosoftAspNetCoreComponentsParameterAttribute and
|
||||
exists(NameOfExpr ne | ne = this.getArgument(1) | result.getAnAccess() = ne.getAccess())
|
||||
(
|
||||
exists(NameOfExpr ne | ne = this.getArgument(1) | result.getAnAccess() = ne.getAccess())
|
||||
or
|
||||
exists(string propertyName | propertyName = this.getArgument(1).(StringLiteral).getValue() |
|
||||
result.hasName(propertyName)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user