File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
java/ql/src/experimental/CWE-939 Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,11 @@ class HostVerificationMethodAccess extends MethodAccess {
63
63
.getRepresentedString ( )
64
64
.charAt ( 0 ) != "." //"."+var2, check string constant "." e.g. String domainName = "example.com"; Uri.parse(url).getHost().endsWith("www."+domainName)
65
65
or
66
- exists ( MethodAccess ma |
66
+ exists ( MethodAccess ma , Method m |
67
67
this .getArgument ( 0 ) = ma and
68
- ma .getMethod ( ) .hasName ( "getString" ) and
68
+ ma .getMethod ( ) = m and
69
+ m .hasName ( "getString" ) and
70
+ m .getDeclaringType ( ) .getQualifiedName ( ) = "android.content.res.Resources" and
69
71
ma .getArgument ( 0 ) .toString ( ) .indexOf ( "R.string" ) = 0
70
72
) //Check resource properties in /res/values/strings.xml in Android mobile applications using res.getString(R.string.key)
71
73
or
You can’t perform that action at this time.
0 commit comments