mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Merge pull request #7105 from erik-krogh/flagJqueryUI
JS: have the aliasPropertyPresenceStep step over extend calls
This commit is contained in:
@@ -426,6 +426,17 @@ module AccessPath {
|
||||
result = AccessPath::getAReferenceTo(root, accessPath)
|
||||
)
|
||||
or
|
||||
// step over extend calls. Handle aliasing both ways through the extend call.
|
||||
exists(
|
||||
DataFlow::SourceNode rootOne, DataFlow::SourceNode rootTwo, string accessPath,
|
||||
ExtendCall extendCall
|
||||
|
|
||||
rootOne = [extendCall, extendCall.getAnOperand().getALocalSource()] and
|
||||
rootTwo = [extendCall, extendCall.getAnOperand().getALocalSource()] and
|
||||
node = pragma[only_bind_into](AccessPath::getAReferenceTo(rootOne, accessPath)) and
|
||||
result = AccessPath::getAReferenceTo(rootTwo, accessPath)
|
||||
)
|
||||
or
|
||||
result = node.getALocalSource()
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,12 @@ nodes
|
||||
| unsafe-jquery-plugin.js:179:5:179:11 | options |
|
||||
| unsafe-jquery-plugin.js:179:5:179:18 | options.target |
|
||||
| unsafe-jquery-plugin.js:179:5:179:18 | options.target |
|
||||
| unsafe-jquery-plugin.js:185:28:185:34 | options |
|
||||
| unsafe-jquery-plugin.js:185:28:185:34 | options |
|
||||
| unsafe-jquery-plugin.js:186:21:186:27 | options |
|
||||
| unsafe-jquery-plugin.js:186:21:186:30 | options.of |
|
||||
| unsafe-jquery-plugin.js:192:19:192:28 | options.of |
|
||||
| unsafe-jquery-plugin.js:192:19:192:28 | options.of |
|
||||
edges
|
||||
| unsafe-jquery-plugin.js:2:38:2:44 | options | unsafe-jquery-plugin.js:3:5:3:11 | options |
|
||||
| unsafe-jquery-plugin.js:2:38:2:44 | options | unsafe-jquery-plugin.js:3:5:3:11 | options |
|
||||
@@ -245,6 +251,11 @@ edges
|
||||
| unsafe-jquery-plugin.js:178:27:178:33 | options | unsafe-jquery-plugin.js:179:5:179:11 | options |
|
||||
| unsafe-jquery-plugin.js:179:5:179:11 | options | unsafe-jquery-plugin.js:179:5:179:18 | options.target |
|
||||
| unsafe-jquery-plugin.js:179:5:179:11 | options | unsafe-jquery-plugin.js:179:5:179:18 | options.target |
|
||||
| unsafe-jquery-plugin.js:185:28:185:34 | options | unsafe-jquery-plugin.js:186:21:186:27 | options |
|
||||
| unsafe-jquery-plugin.js:185:28:185:34 | options | unsafe-jquery-plugin.js:186:21:186:27 | options |
|
||||
| unsafe-jquery-plugin.js:186:21:186:27 | options | unsafe-jquery-plugin.js:186:21:186:30 | options.of |
|
||||
| unsafe-jquery-plugin.js:186:21:186:30 | options.of | unsafe-jquery-plugin.js:192:19:192:28 | options.of |
|
||||
| unsafe-jquery-plugin.js:186:21:186:30 | options.of | unsafe-jquery-plugin.js:192:19:192:28 | options.of |
|
||||
#select
|
||||
| unsafe-jquery-plugin.js:3:5:3:11 | options | unsafe-jquery-plugin.js:2:38:2:44 | options | unsafe-jquery-plugin.js:3:5:3:11 | options | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:2:19:63:2 | functio ... \\t\\t}\\n\\n\\t} | '$.fn.my_plugin' plugin |
|
||||
| unsafe-jquery-plugin.js:5:5:5:18 | options.target | unsafe-jquery-plugin.js:2:38:2:44 | options | unsafe-jquery-plugin.js:5:5:5:18 | options.target | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:2:19:63:2 | functio ... \\t\\t}\\n\\n\\t} | '$.fn.my_plugin' plugin |
|
||||
@@ -268,3 +279,4 @@ edges
|
||||
| unsafe-jquery-plugin.js:157:44:157:59 | options.target.a | unsafe-jquery-plugin.js:153:38:153:44 | options | unsafe-jquery-plugin.js:157:44:157:59 | options.target.a | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:153:19:158:2 | functio ... NCY]\\n\\t} | '$.fn.my_plugin' plugin |
|
||||
| unsafe-jquery-plugin.js:170:6:170:11 | target | unsafe-jquery-plugin.js:160:38:160:44 | options | unsafe-jquery-plugin.js:170:6:170:11 | target | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:160:19:173:2 | functio ... \\t\\t}\\n\\n\\t} | '$.fn.my_plugin' plugin |
|
||||
| unsafe-jquery-plugin.js:179:5:179:18 | options.target | unsafe-jquery-plugin.js:178:27:178:33 | options | unsafe-jquery-plugin.js:179:5:179:18 | options.target | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:178:18:180:2 | functio ... T OK\\n\\t} | '$.fn.my_plugin' plugin |
|
||||
| unsafe-jquery-plugin.js:192:19:192:28 | options.of | unsafe-jquery-plugin.js:185:28:185:34 | options | unsafe-jquery-plugin.js:192:19:192:28 | options.of | Potential XSS vulnerability in the $@. | unsafe-jquery-plugin.js:185:18:194:2 | functio ... et);\\n\\t} | '$.fn.position' plugin |
|
||||
|
||||
@@ -182,4 +182,14 @@
|
||||
$(document).find(options.target); // OK
|
||||
}});
|
||||
|
||||
$.fn.position = function( options ) {
|
||||
if ( !options || !options.of ) {
|
||||
return doSomethingElse( this, arguments );
|
||||
}
|
||||
// extending options
|
||||
options = $.extend( {}, options );
|
||||
|
||||
var target = $( options.of ); // NOT OK
|
||||
console.log(target);
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user