@@ -615,13 +615,21 @@ module TaintTracking {
615615 }
616616
617617 /**
618- * A pseudo-property used to store a value on a `URLSearchParams` that
619- * can be obtained with a `get` or `getAll` call.
618+ * A pseudo-property a `URL` that stores a value that can be obtained
619+ * with a `get` or `getAll` call to the `searchParams` property .
620620 */
621621 private string hiddenUrlPseudoProperty ( ) {
622622 result = "$hiddenSearchPararms"
623623 }
624624
625+ /**
626+ * A pseudo-property on a `URLSearchParams` that can be obtained
627+ * with a `get` or `getAll` call.
628+ */
629+ private string getableUrlPseudoProperty ( ) {
630+ result = "$gettableSearchPararms"
631+ }
632+
625633 /**
626634 * A taint propagating data flow edge arising from URL parameter parsing.
627635 */
@@ -654,17 +662,18 @@ module TaintTracking {
654662 pred = newUrl .getArgument ( 0 )
655663 )
656664 or
657- prop = hiddenUrlPseudoProperty ( ) and
665+ prop = getableUrlPseudoProperty ( ) and
658666 isUrlSearchParams ( succ , pred )
659667 }
660668
661669 /**
662- * Holds if the property `prop ` should be copied from the object `pred` to the object `succ`.
670+ * Holds if the property `loadStep ` should be copied from the object `pred` to the property `storeStep` of object `succ`.
663671 *
664672 * This step is used to copy a value the value of our pseudo-property that can later be accessed using a `get` or `getAll` call.
665673 */
666- override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
667- prop = hiddenUrlPseudoProperty ( ) and
674+ override predicate loadStoreStep ( DataFlow:: Node pred , DataFlow:: Node succ , string loadProp , string storeProp ) {
675+ loadProp = hiddenUrlPseudoProperty ( ) and
676+ storeProp = getableUrlPseudoProperty ( ) and
668677 exists ( DataFlow:: PropRead write | write = succ |
669678 write .getPropertyName ( ) = "searchParams" and
670679 write .getBase ( ) = pred
@@ -677,7 +686,7 @@ module TaintTracking {
677686 * This step is used to load the value stored in the hidden pseudo-property.
678687 */
679688 override predicate loadStep ( DataFlow:: Node pred , DataFlow:: Node succ , string prop ) {
680- prop = hiddenUrlPseudoProperty ( ) and
689+ prop = getableUrlPseudoProperty ( ) and
681690 // this is a call to `get` or `getAll` on a `URLSearchParams` object
682691 exists ( string m , DataFlow:: MethodCallNode call | call = succ |
683692 call .getMethodName ( ) = m and
0 commit comments