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

Skip to content

Commit 6ab7846

Browse files
committed
JS: Restrict getAContextInput
1 parent fee944a commit 6ab7846

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • javascript/ql/src/semmle/javascript/frameworks

javascript/ql/src/semmle/javascript/frameworks/React.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ private DataFlow::SourceNode getAContextRef(DataFlow::CallNode createContext) {
632632
*/
633633
pragma[nomagic]
634634
private DataFlow::Node getAContextInput(DataFlow::CallNode createContext) {
635+
createContext = react().getAMemberCall("createContext") and
635636
result = createContext.getArgument(0) // initial value
636637
or
637638
exists(JSXElement provider |

0 commit comments

Comments
 (0)