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 {
550550 *
551551 * See https://docs.angularjs.org/api/ng/service/$location for details.
552552 */
553- private class LocationFlowSource extends RemoteFlowSource instanceof DataFlow::MethodCallNode {
553+ private class LocationFlowSource extends ClientSideRemoteFlowSource instanceof DataFlow::MethodCallNode
554+ {
555+ private ClientSideRemoteFlowKind kind;
556+
554557 LocationFlowSource() {
555558 exists(ServiceReference service, string m, int n |
556559 service.getName() = "$location" and
557560 this = service.getAMethodCall(m) and
558561 n = super.getNumArgument()
559562 |
560- m = "search" and n < 2
563+ m = "search" and n < 2 and kind.isQuery()
561564 or
562- m = "hash" and n = 0
565+ m = "hash" and n = 0 and kind.isFragment()
563566 )
564567 }
565568
566569 override string getSourceType() { result = "$location" }
570+
571+ override ClientSideRemoteFlowKind getKind() { result = kind }
567572}
568573
569574/**
You can’t perform that action at this time.
0 commit comments