Skip to content

Commit c0a63be

Browse files
committed
deprecate unused document predicates in DOM.qll
1 parent 5e52a71 commit c0a63be

File tree

1 file changed

+12
-5
lines changed
  • javascript/ql/lib/semmle/javascript/security/dataflow

1 file changed

+12
-5
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/DOM.qll

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@ predicate isLocation(Expr e) {
2929
}
3030

3131
/**
32+
* DEPRECATED: Use DOM::documentRef() instead.
3233
* Gets a reference to the 'document' object.
3334
*/
34-
DataFlow::SourceNode document() { result = DOM::documentRef() }
35+
deprecated DataFlow::SourceNode document() { result = DOM::documentRef() }
3536

36-
/** Holds if `e` could refer to the `document` object. */
37-
predicate isDocument(Expr e) { DOM::documentRef().flowsToExpr(e) }
37+
/**
38+
* DEPRECATED: Use DOM::documentRef() instead.
39+
* Holds if `e` could refer to the `document` object.
40+
*/
41+
deprecated predicate isDocument(Expr e) { DOM::documentRef().flowsToExpr(e) }
3842

39-
/** Holds if `e` could refer to the document URL. */
40-
predicate isDocumentURL(Expr e) { e.flow() = DOM::locationSource() }
43+
/**
44+
* DEPRECATED: Use DOM::locationSource() instead.
45+
* Holds if `e` could refer to the document URL.
46+
*/
47+
deprecated predicate isDocumentURL(Expr e) { e.flow() = DOM::locationSource() }
4148

4249
/**
4350
* DEPRECATED. In most cases, a sanitizer based on this predicate can be removed, as

0 commit comments

Comments
 (0)