Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0c51b5

Browse files
committed
Java: Convert WebViewGetUrlMethod to CSV based flow source
1 parent 8ba820c commit e0c51b5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ private predicate sourceModelCsv(string row) {
162162
"android.util;AttributeSet;false;getIdAttribute;;;ReturnValue;remote",
163163
"android.util;AttributeSet;false;getIdAttributeResourceValue;;;ReturnValue;remote",
164164
"android.util;AttributeSet;false;getPositionDescription;;;ReturnValue;remote",
165-
"android.util;AttributeSet;false;getStyleAttribute;;;ReturnValue;remote"
165+
"android.util;AttributeSet;false;getStyleAttribute;;;ReturnValue;remote",
166+
// The current URL in a browser may be untrusted or uncontrolled.
167+
// WebViewGetUrlMethod
168+
"android.webkit;WebView;false;getUrl;();;ReturnValue;remote",
169+
"android.webkit;WebView;false;getOriginalUrl;();;ReturnValue;remote"
166170
]
167171
}
168172

java/ql/src/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ class DatabaseInput extends LocalUserInput {
215215
private class RemoteTaintedMethod extends Method {
216216
RemoteTaintedMethod() {
217217
this instanceof PlayRequestGetMethod or
218-
this instanceof SpringRestTemplateResponseEntityMethod or
219-
// The current URL in a browser may be untrusted or uncontrolled.
220-
this instanceof WebViewGetUrlMethod
218+
this instanceof SpringRestTemplateResponseEntityMethod
221219
}
222220
}
223221

0 commit comments

Comments
 (0)