File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
javascript/ql/lib/semmle/javascript/frameworks/AngularJS Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -550,20 +550,25 @@ class DirectiveTargetName extends string {
550
550
*
551
551
* See https://docs.angularjs.org/api/ng/service/$location for details.
552
552
*/
553
- private class LocationFlowSource extends RemoteFlowSource instanceof DataFlow:: MethodCallNode {
553
+ private class LocationFlowSource extends ClientSideRemoteFlowSource instanceof DataFlow:: MethodCallNode
554
+ {
555
+ private ClientSideRemoteFlowKind kind ;
556
+
554
557
LocationFlowSource ( ) {
555
558
exists ( ServiceReference service , string m , int n |
556
559
service .getName ( ) = "$location" and
557
560
this = service .getAMethodCall ( m ) and
558
561
n = super .getNumArgument ( )
559
562
|
560
- m = "search" and n < 2
563
+ m = "search" and n < 2 and kind . isQuery ( )
561
564
or
562
- m = "hash" and n = 0
565
+ m = "hash" and n = 0 and kind . isFragment ( )
563
566
)
564
567
}
565
568
566
569
override string getSourceType ( ) { result = "$location" }
570
+
571
+ override ClientSideRemoteFlowKind getKind ( ) { result = kind }
567
572
}
568
573
569
574
/**
You can’t perform that action at this time.
0 commit comments