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 {
6363 .getRepresentedString ( )
6464 .charAt ( 0 ) != "." //"."+var2, check string constant "." e.g. String domainName = "example.com"; Uri.parse(url).getHost().endsWith("www."+domainName)
6565 or
66- exists ( MethodAccess ma |
66+ exists ( MethodAccess ma , Method m |
6767 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
6971 ma .getArgument ( 0 ) .toString ( ) .indexOf ( "R.string" ) = 0
7072 ) //Check resource properties in /res/values/strings.xml in Android mobile applications using res.getString(R.string.key)
7173 or
You can’t perform that action at this time.
0 commit comments