File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -117,20 +117,19 @@ private string getInputSensitiveInfoRegex() {
117117 ]
118118}
119119
120- /** Holds if input using the given input type (as written in XML) may be stored in the keyboard cache. */
120+ /** Holds if input using the given input type (as written in XML) is not stored in the keyboard cache. */
121121bindingset [ ty]
122- private predicate inputTypeCached ( string ty ) {
123- ty .matches ( "%text%" ) and
124- not ty .regexpMatch ( "(?i).*(nosuggestions|password).*" )
122+ private predicate inputTypeNotCached ( string ty ) {
123+ not ty .matches ( "%text%" )
124+ or
125+ ty .regexpMatch ( "(?i).*(nosuggestions|password).*" )
125126}
126127
127128/** Gets an input field whose contents may be sensitive and may be stored in the keyboard cache. */
128129AndroidEditableXmlElement getASensitiveCachedInput ( ) {
129130 result .getId ( ) .regexpMatch ( getInputSensitiveInfoRegex ( ) ) and
130131 (
131- inputTypeCached ( result .getInputType ( ) )
132- or
133- not exists ( result .getInputType ( ) ) and
132+ not inputTypeNotCached ( result .getInputType ( ) ) and
134133 not exists ( GoodInputTypeConf conf , DataFlow:: Node src , DataFlow:: Node sink |
135134 conf .hasFlow ( src , sink ) and
136135 sink .asExpr ( ) = setInputTypeForId ( result .getId ( ) )
You can’t perform that action at this time.
0 commit comments