File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,15 @@ module DOM {
326326
327327 private class DefaultRange extends Range {
328328 DefaultRange ( ) {
329- this = domValueRef ( ) .getAPropertyRead ( "location" )
329+ exists ( string propName | this = documentRef ( ) .getAPropertyRead ( propName ) |
330+ propName = "documentURI" or
331+ propName = "documentURIObject" or
332+ propName = "location" or
333+ propName = "referrer" or
334+ propName = "URL"
335+ )
336+ or
337+ this = DOM:: domValueRef ( ) .getAPropertyRead ( "baseUri" )
330338 or
331339 this = DataFlow:: globalVarRef ( "location" )
332340 }
Original file line number Diff line number Diff line change @@ -38,17 +38,7 @@ predicate isDocument(Expr e) { DOM::documentRef().flowsToExpr(e) }
3838
3939/** Holds if `e` could refer to the document URL. */
4040predicate isDocumentURL ( Expr e ) {
41- exists ( string propName | e = DOM:: documentRef ( ) .getAPropertyRead ( propName ) .asExpr ( ) |
42- propName = "documentURI" or
43- propName = "documentURIObject" or
44- propName = "location" or
45- propName = "referrer" or
46- propName = "URL"
47- )
48- or
49- e = DOM:: domValueRef ( ) .getAPropertyRead ( "baseUri" ) .asExpr ( )
50- or
51- e .accessesGlobal ( "location" )
41+ DOM:: locationRef ( ) .flowsToExpr ( e )
5242}
5343
5444/**
Original file line number Diff line number Diff line change 11test_documentRef
22| customization.js:2:13:2:31 | customGetDocument() |
33test_locationRef
4+ | customization.js:3:3:3:14 | doc.location |
45test_domValueRef
56| customization.js:4:3:4:28 | doc.get ... 'test') |
You can’t perform that action at this time.
0 commit comments