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() {
117
117
]
118
118
}
119
119
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. */
121
121
bindingset [ 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).*" )
125
126
}
126
127
127
128
/** Gets an input field whose contents may be sensitive and may be stored in the keyboard cache. */
128
129
AndroidEditableXmlElement getASensitiveCachedInput ( ) {
129
130
result .getId ( ) .regexpMatch ( getInputSensitiveInfoRegex ( ) ) and
130
131
(
131
- inputTypeCached ( result .getInputType ( ) )
132
- or
133
- not exists ( result .getInputType ( ) ) and
132
+ not inputTypeNotCached ( result .getInputType ( ) ) and
134
133
not exists ( GoodInputTypeConf conf , DataFlow:: Node src , DataFlow:: Node sink |
135
134
conf .hasFlow ( src , sink ) and
136
135
sink .asExpr ( ) = setInputTypeForId ( result .getId ( ) )
You can’t perform that action at this time.
0 commit comments